Skip to content

Instantly share code, notes, and snippets.

@mshuffett
Created July 11, 2013 07:59
Show Gist options
  • Save mshuffett/5973441 to your computer and use it in GitHub Desktop.
Save mshuffett/5973441 to your computer and use it in GitHub Desktop.
Angular mod_rewrite rule for html5 mode.
# Apache .htaccess
# angularjs pushstate (history) support:
# See http://www.josscrowcroft.com/2012/code/htaccess-for-html5-history-pushstate-url-routing/
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
</ifModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment