title: Sharepoint app fails to retrieve files properly. How do I fix it?
body: <p>I've created a Sharepoint app and uploaded it to the apps website. However, when I open it on my browser, the page isn't being loaded properly. It has some text but it's not formatted at all. It looks like the js files, the css files and images aren't being loaded. The app is located on the subdomain: </p>
  
  <pre><code>http://app-c2465aefbd73b6.pempekapps.com.au
  </code></pre>
  
  <p>and the site collection is at:</p>
  
  <pre><code>http://sharepoint/sites/dev/
  </code></pre>
  
  <p>I looked at one of the requests through Firebug and this is what it contained. The file being retrieved (init.js) contains HTML instead of javascript.</p>
  
  <p>Request:</p>
  
  <pre><code>GET http://app-c2465aefbd73b6.pempekapps.com.au/_layouts/15/init.js?rev=zwpf9CD1m7am6imImmQglQ%3D%3D
  </code></pre>
  
  <p>Response: </p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"&gt;&lt;meta name="Robots" content="NOINDEX " /&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;
              &lt;script type="text/javascript"&gt;
               var gearPage = document.getElementById('GearPage');
               if(null != gearPage)
               {
                   gearPage.parentNode.removeChild(gearPage);
                   document.title = "Error";
               }
               &lt;/script&gt;
               &lt;/html&gt;
  </code></pre>