Skip to content

Instantly share code, notes, and snippets.

@joshmvandercom
Created January 19, 2012 15:57
Show Gist options
  • Save joshmvandercom/1640735 to your computer and use it in GitHub Desktop.
Save joshmvandercom/1640735 to your computer and use it in GitHub Desktop.
.htaccess redirect w/ hash
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} !ajax
RewriteRule ^(.*)$ /#/$1 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment