How to FIX 404 Error when Switching Between Pages in cPanel for React.js Websites

preview_player
Показать описание


.htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

If that does not work:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
Рекомендации по теме
Комментарии
Автор

Brother, u r a life saver. I love you ur channel. Ur channel deserves even more than billion subscribers. I do not know what to say right now. It worked thank u alot

well_done_
Автор

This saved me so much of time. Thanks a ton man!

carbonflk
Автор

You saved my day and my money because otherwise I had to buy a dedicated VPS! Thank you!

danielsilver
Автор

Thank you so much man you just saved my reputation in front of my team. Keep doing the goog work..

HamzaAhmed-ihkf
Автор

bro you just saved me I was stuck here for the past 2 weeks❤ and it will work on Direct Admin too so anyone with AWS

anmolmishra
Автор

Thanks you so much! Works perfectly! :)

kris.sparts
Автор

Hostingar not allowed to me upload to .htacces file 😢😢😢

nayaktricksgaming
Автор

You saved me from a lot of problem pookie!!!!

bekiteshome
Автор

hi bro it work only static route but if we have dynamic route then how we get this ?

mahersaqib-ehpl
Автор

I creat project with next js and i add this file. Htaccess but whene i refreshed it redirectede to homr page 😢

moustaphaelhor
Автор

Thank you bro.. i apply this and solve

ashwanigupta
Автор

Still we are facing issue - VPS hostinger

AppNest-vqhl
visit shbcf.ru