Created
December 10, 2009 14:01
-
-
Save oneup/253347 to your computer and use it in GitHub Desktop.
apache2 redirect everything to index.html prevent loop
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 2 mod_rewrite no infinite redirect loops | |
RewriteEngine on | |
# still keep /static folder | |
RewriteCond %(REQUEST_URI) !^(\/static) [NC] | |
# don't rewrite index.html (prevents infinite loop) | |
RewriteRule !index\.html - [C] | |
# rewrite everything to index | |
RewriteRule .* /index.html [R] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment