Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Created June 27, 2020 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wolfr/4b411fc0b38fd2756fbe786d7535d6ef to your computer and use it in GitHub Desktop.
Save Wolfr/4b411fc0b38fd2756fbe786d7535d6ef to your computer and use it in GitHub Desktop.
# htaccess config to redirect SPAs to index.html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.html
<Files "*.js">
ForceType text/javascript
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment