So i was facing Routing issue after deploying my React JS build on server. On local system my routing was working fine but after deploying over the server it wasn't routing on next pages.
Error Was
## Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occured, and the actions you performed just before this error.
More information about this error may be available in the server log.
---
Apache/2.4.52 (Ubuntu) Server at XX.XXX.X.XXX Port XXXX
After trying alot i have tried to create a .htaccess
file in build folder
content you can add in .htaccess
file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Top comments (0)