This is probably a really stupid question, but I am in the midst of redesigning my site and am renaming from shtml to php3, the search engines have my pages as shtml (actually they still have some html) how do I keep visitors from hitting the 404 page everytime they click on a link from the search engine? I have ALOT of pages, making a META redirect for each page seems a daunting task, is there an easier way?
If you know PHP you can easily build a page that to replace your 404 error. What this page would do is remove the extension, add .php3 and redirect the user to that page. If the page has a php3 extension and its still not found you can display a 404 error similar to Sitepoint.com's
( www.sitepoint.com/missingpage.html ).
This would take a knowledge of PHP though, which I currently lack at this time.
Logic would be:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
if extension not equal to php3
find '.' in URL string.
remove everything to the right of the '.'
concatenate 'php3'
redirect user
else
display 404 error message with feedback form.
[/code]
Sounds good to me, I guess I am off to track down some more PHP tuts. I am just starting to learn PHP and can't do much more than put an include in. :-)
Thanks for the input!
Also on WebmasterBase.com is a full tutorial on using PHP and a database to activate your website. It was written by a SitePoint staff member and is one of the best Internet Tutorials I have seen. You can see it here: http://www.webmasterbase.com/article.php3?aid=228&pid=0
Bookmarks