Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created September 9, 2014 07:19
Show Gist options
  • Save jbutko/6b500210b4c6811bca54 to your computer and use it in GitHub Desktop.
Save jbutko/6b500210b4c6811bca54 to your computer and use it in GitHub Desktop.
.htaccess, #AngularJS, UI-Router: Configure Apache server to work with html5Mode
# 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
@ReverseLogicSocial
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment