![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re^3: Doing a proper 404 redirectby afoken (Chancellor) |
on Mar 24, 2010 at 15:03 UTC ( #830590=note: print w/replies, xml ) | Need Help?? |
I think you have a problem understanding the HTTP protocol. Imagine you knock on a door and ask for a photo of a certain teddy bear. This is a HTTP request. Now, you could get some different responses:
Is it clear now? What answer do you want to give? 404 means "I don't have that, and I don't know where it is." No Redirection. 301/302/303/307 means "OK, I don't have it here, but look over there." with minor differences in WHY you don't have the requested resource. Redirection follows automatically. Or the really hard 410? "It is no longer here, and it won't come back." Why do you think that search engines or customers need a special treatment? If a resource is not available, send 404 or perhaps 410. If it is elsewhere, send 301/302/303/307. If you want to help humans navigating your page when they hit a 404 page, you could add a search form, a link to a search page, a link to a site map, or links to the most wanted pages to the 404 page. Just make sure that the 404 page is larger than 1024 bytes, or else MS IE users will only see a braindead default page generated by the MS IE. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|