Hi, I have changed alot of pages in my site and I feels that now serps may give 404 errors so I want all my 404 page to be redirected to my home page immediately. What can be the safest way of doing this ? what should I add in .htaccess ? is it good to have customized 404 page or just diret him to home page? Regards
I think that should be ErrorDoucment 404 Index. whatever You may also want to consider a custom error page where you refer the above to somepage.whatever instead of the index page/home page. This is somewhat more friendly any may help you preserve and deep linked pages. See an example at www.my-e-space.com/nosuchpage.html On that page you would provide links to the new pages on your site. If you are really organized it could take the form of if you were looking x it is now at Y. I wasn't and this was all I did.
We all assumed you knew more than you do. Sorry about that. There is a file in the first directory of your site, public_html, if you are using cPanel and a couple of the other control panels call it http_docs I think. The file name is .htaccess. It controls all the behind the scenes stuff that manages your site. In this case you are telling it that you want to use a custum error page or that you want all errors forwarded to a specific page. To do what you first asked about you would add the following line to your .htaccess file: ErrorDocument 404 /index.php (or index.html, whatever your index page is). To use a custom error page as I did in the example in the earlier post you need to create the custom page and redirect to it like this: ErrorDocument 404 /404.html My custom error page is named 404.html Hope we cleared all this up for you.
I also facing the same problem. i've been put htaccess "ErrorDocument 404 /index.html" but seems not working, i put it in html folder. where i should put this htacces, in the root folder or html folder ? thank you.