Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
Is there a way to add a 301 to my .htaccess file that redirects all pages with an .asp extension to my home page? We just migrated to .php and have a few hundred .asp pages that are still ranking in the SE's. I've added the following line so far...
ErrorDocument 404 http://www.example.com/not-found
But, I don't think this is the best solution.
[edited by: incrediBILL at 6:02 pm (utc) on July 15, 2009]
[edit reason] exemplified URLs, no specifics please [/edit]
However, you missed a trick here. You could have retained the *same* URLs for all of your content. You could have done that either
- by naming your files as .asp and telling Apache that files with the .asp extension actually contain PHP scripting *or*
- you could have named the files as .php and at the same time retained the URLs shown in links as .asp and then set up an internal rewrite such that requests for .asp URLs are serviced by files with .php names.
This is an important point.