Last active
August 29, 2015 14:06
-
-
Save mgoku/6ef5aced65fcc660b28d to your computer and use it in GitHub Desktop.
.htaccess for Angularjs app in html5 mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache .htaccess | |
# Thanks to Eric Duran http://ericduran.io/2013/05/31/angular-html5Mode-with-yeoman/ | |
# angularjs pushstate (history) support: | |
# See http://www.josscrowcroft.com/2012/code/htaccess-for-html5-history-pushstate-url-routing/ | |
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !index | |
RewriteCond %{REQUEST_URI} !.*\.(css|js|html|png|jpg|ico) #Add extra extensions if needed. | |
RewriteRule (.*) index.html [L] | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment