-
-
Save jbutko/6b500210b4c6811bca54 to your computer and use it in GitHub Desktop.
# 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 |
@yves-s: Did you solve this? I'm getting the same problem
Hello,
I am also getting the same problem. If I refresh http://anaoh.com/home, It shows the directory index.
Please let me know if you have any suggestion.
Raja K
Need Help!!
On refreshing pages " localhost/blog/list " or opening pages "localhost/blog/" does not work while links like "localhost/blog" open even on refreshing.
To those still facing this problem, it's more common now to use the FallbackResource
directive instead of adding a mod_rewrite block. Read more here.
This works perfectly, but in child routing, it throughs errors,
"Uncaught SyntaxError: Unexpected token"
and page doesn't get loaded.
Need help on this
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?
What would be the href values for the links to navigate? For example, please consider the following links:
<a href="1">Home</a> | <a href="2">Members</a> | <a href="2/3">Child of Members</a>
In the above, what would be the values of 1, 2 and 3? The first link points to Home page, 2nd link points to Members page, 3rd link points to the child present inside the Members page (folder)?
Any help is appreciated.