Created
November 20, 2018 01:49
-
-
Save eslam-mahmoud/8a1e1de0df103af10a2cf4290fda8db9 to your computer and use it in GitHub Desktop.
Single page app .htaccess
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
RewriteEngine on | |
# If an existing asset or directory is requested go to it as it is | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d | |
RewriteRule ^ - [L] | |
# If the requested resource doesn't exist, use index.html | |
Options +FollowSymLinks | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !index | |
RewriteRule (.*) index.html [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment