title: Apache rewrite rules not being applied for angularjs
body: <p>I am trying to setup apache 2.2 with AngularJS with an almost exact structure as the one from the following closed question.  </p>
  
  <p><a href="https://stackoverflow.com/questions/15284038/rewrite-rules-for-apache-2-to-use-with-angular-js">rewrite rules for apache 2 to use with angular js</a></p>
  
  <p>I would like to redirect all requests to app/index.html except for requests to /api.</p>
  
  <p>My directory structure is as followed</p>
  
  <ul>
  <li>/</li>
  <li>/app</li>
  <li>/app/index.html</li>
  <li>/app/css</li>
  <li>/app/js</li>
  <li>/api</li>
  </ul>
  
  <p>I am trying to apply these redirect rules in the httpd-vhosts file as such which was posted as the correct answer <a href="https://stackoverflow.com/a/15284848/671095">https://stackoverflow.com/a/15284848/671095</a> to the question.</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName www.test.com
  DocumentRoot "C:/websites/test"
  Alias /CFIDE "C:/websites/CFIDE"
  
  RewriteEngine On
  
  # if a directory or a file exists, use it directly
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteCond %{REQUEST_URI} !/api
  
  # otherwise forward it to index.html 
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^app/. /app/index.html [NC,L]
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>However when I try visit / in the browser I am presented with a blank screen. If I enter to /app/index.html in the browser however I am able to view the html page in my browser but none of the css.or js can be accessed and is returning a 404.</p>
  
  <p>I have been going nuts over this which seems like a simple thing to accomplish as an apache rewrite.</p>
  
  <p>Any help would be much appreciated</p>