Forum Moderators: open
i have a couple of pages which are no longer in service.
I dont want that they get crawled again, but it should be still user-friendly if visitors click through from google-index.
If visitors try to reach the outdated page, i am now transfering them to the "index" page.
Is there any problem doing this kind of 404 with a dynamic page and a redirect with location?
header("HTTP/1.0 404 Not Found");
header("Location: [example.com...]
Thank you!
For more information on HTTP status codes, see RFC 2616:
[w3.org...]
(PS - thanks for using "example.com" in your example. That's very responsible of you.)
For a 301 redirect put this in your .htaccess file.
redirect 301 /example.html [domainname.com...]