Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

htaccess, 404 and redirect

         

jaimes

6:42 pm on May 29, 2008 (gmt 0)

10+ Year Member



Hi, we just transferred out new site, same domain, but different internal urls other than the home page.

What is the best way to have HTAccess files 404 for the searchbots but also redirect to the new homepage?

http://www.example.com/proddetail.cfm.../2501/SubCatID/171/ItemID/439/Index.cfm

This is a php application built with codeigniter of you are familiar.

tedster

6:48 pm on May 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Those are two different status codes - you can only send one or the other. My approach is to 301 redirect any important urls, (good rankings and search traffic, decent backlinks, or lots of direct entry traffic) and let the rest get a 404. Google seems to catch on much more quickly when there is not a ton of 301 redirects going on.

jaimes

7:20 pm on May 29, 2008 (gmt 0)

10+ Year Member



ok thanks, but is there a graceful way to have things 404, do I put something on the end of those urls to tell the bots it will now be a 404 page

or

do i just let the bots come and not find the page and 404 themselves

as always much appreciated tedster

tedster

7:34 pm on May 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your server should automatically reply with a 404 status if the requested url is not available. You don't need to do anything special at all.

If you want your users to get something a little more jazzy, each type of server has ways to set up a "custom 404" message. Just make sure that the http status is still 404 and you can give the user a special page with helpful content and links.