Answers for ".htaccess for react app"

1

reactjs .htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /subdirectory
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule . /index.html [L]
</IfModule>
Posted by: Guest on January-29-2021
0

react htaccess

Nginx:
location / {
  try_files $uri /index.html;
}

Apache
<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>
Posted by: Guest on January-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language