Created
September 9, 2014 07:19
-
-
Save jbutko/6b500210b4c6811bca54 to your computer and use it in GitHub Desktop.
.htaccess, #AngularJS, UI-Router: Configure Apache server to work with html5Mode
This file contains hidden or 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
# this ensures support for pretty links even after page refresh (F5) | |
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On | |
# Don't rewrite files or directories | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
# Rewrite everything else to index.html to allow html5 state links | |
RewriteRule ^ index.html [L] | |
</IfModule> | |
# via https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am also having the same problem.
Ever since I turned on the html5 mode, all emails links and forced browser reloads are breaking.
Any help how to overcome this scenario?