-
-
Save kareemkibue/dff73d38f16e2aa2fe21 to your computer and use it in GitHub Desktop.
.htaccess required for Angular JS HTML5 Mode, Routing (Pretty URLs)
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
#REQUIREMENTS | |
# 1. <base href="/" > inside <head> before importing external (local) stylesheets and javascript files | |
# the above is required if deep linking | |
# | |
# 2. in the module configuration, set html5mode to TRUE i.e. $locationProvider.html5Mode(true).hashPrefix('!'); | |
#BEGIN | |
Options +FollowSymLinks | |
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !index | |
RewriteRule (.*) index.html [L] | |
</ifModule> | |
#END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you tell me why is it when I'm writing with http://myapp.com/?_escaped_fragment_/about i get
http://myapp.com/?_escaped_fragment_%2Fabout? Is there any rewrite rule so i can get clean url like http://myapp.com/about