Magento – How to redirect all 404 errors page to home page / specified url in .htaccess
errorhttp-error-404magento-1.9
How to redirect 404 page to home page?
Best Answer
Login to the admin and go to
System > Configuration > Web and change the drop-down value for CMS No Route Page in the Default Pages section. You should be able to select your Home Page.
Second method by .htaccess:
For example, if you wish to redirect the 404 (File Not Found) errors to http://example.com, you should add this line to your .htaccess file:
Make sure you set the right homepage for each store view under System->Configuration->Web->Default Pages->CMS Home Page. Make sure the page you set for each store view is active in that store view.
Best Answer
Login to the admin and go to
System > Configuration > Web
and change the drop-down value forCMS No Route Page
in the Default Pages section. You should be able to select yourHome Page
.Second method by .htaccess:
For example, if you wish to redirect the 404 (File Not Found) errors to
http://example.com
, you should add this line to your .htaccess file: