Hello how do I redirect an error 404 to a home page with .htaccess?
Example: site.com if write site.com/some_site_notforund instead of 404 redirects us to the main page
Example 2:
sadistic.pl if write sadistic.pl/some_site_notfound instead of 404 redirects us to current page
Try:
FallbackResource /index.html
or whatever the homepage is
try:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /index.html [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With