Skip to content

Instantly share code, notes, and snippets.

@edihasaj
Created March 1, 2022 14:19
Show Gist options
  • Save edihasaj/103f99e471f3c3d8e33e410d87d78a63 to your computer and use it in GitHub Desktop.
Save edihasaj/103f99e471f3c3d8e33e410d87d78a63 to your computer and use it in GitHub Desktop.
React refresh 404 fix for PHP server
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment