Skip to content

Instantly share code, notes, and snippets.

@gangstaJS
Forked from santthosh/apache rewrite rule
Created September 19, 2017 08:54
Show Gist options
  • Select an option

  • Save gangstaJS/48aa6c74109889db55822f98e9667b64 to your computer and use it in GitHub Desktop.

Select an option

Save gangstaJS/48aa6c74109889db55822f98e9667b64 to your computer and use it in GitHub Desktop.
Apache config for SPA's
# To be inside the /Directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment