React JS Throwing 500 Internal Server Error On Live Server | React Router Error in Live Server
When we upload our react website on the live server, we face an internal server error is reacting. This is a common .htaccess problem; so to resolve this problem, there are some steps which are following:
Step 1 : Create .htaccess file in react js root folder where index.html or serviceworker.js file exist
Step 2 : Paste the following code in the .htaccess file :
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
Step 3 : Save the .htaccess file and enjoy your working application