Created
October 3, 2013 05:28
-
-
Save geraldyeo/6805416 to your computer and use it in GitHub Desktop.
Rules for AngularJS HTML5 Routing
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
Options +FollowSymLinks | |
IndexIgnore */* | |
RewriteEngine on | |
# if a directory or a file exists, use it directly | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteCond %{REQUEST_URI} !/api | |
# otherwise forward it to index.html | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^app/. /app/index.html [NC,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment