Last active
December 6, 2018 20:52
-
-
Save javierojeda94/1e44a01f3aada6b35078114b2e0bda62 to your computer and use it in GitHub Desktop.
This .htaccess allows a user to refresh the angular app without getting into 404 and without the need to use # routes
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
<IfModule mod_rewrite.c> | |
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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment