title: Angular 2 apache .htaccess file 404 on subpages
body: <p>I have successfully installed and ran Angular 2 app on my apache server, I am able to navigate through the pages via <code>[routerLink]="['/register']"</code></p>
  
  <p>However when I refresh the page I get a 404 error on the register page. Is there something wrong with my rewrite rules:</p>
  
  <pre><code>Options +FollowSymLinks
  &lt;ifModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !index
      RewriteRule (.*) index.html [L]
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>Also here is my apache VirtualHost</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.com
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html/front/dist/browser
      &lt;Directory /var/www/html/front&gt;
          AllowOverride All
      &lt;/Directory&gt;
  
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>