Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Created August 15, 2022 07:52
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 pointofpresence/796d961c1c6c590099fec192caa7ea37 to your computer and use it in GitHub Desktop.
Save pointofpresence/796d961c1c6c590099fec192caa7ea37 to your computer and use it in GitHub Desktop.
Created with Copy to Gist
192
If you are using Apache as your web server, you can insert this into your .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
I am using react: "^16.12.0" and react-router: "^5.1.2" This method is the Catch-all and is probably the easiest way to get you started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment