Skip to content

Instantly share code, notes, and snippets.

@robophil
Created March 7, 2017 14:45
Show Gist options
  • Save robophil/d70ad870ddaea0f1bf1e673091a44551 to your computer and use it in GitHub Desktop.
Save robophil/d70ad870ddaea0f1bf1e673091a44551 to your computer and use it in GitHub Desktop.
Getting angular2 to play well with apache
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# not rewrite css, js and images
RewriteCond %{REQUEST_URI} !\.(?:css|js|map|jpe?g|gif|png)$ [NC]
RewriteRule ^(.*)$ /index.html?path=$1 [NC,L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment