I am creating a new site that replaces quite an extensive old site (about 1,000 pages) and wanted an elegant way to map the old URL’s to the new URL’s. Of course, this is mainly to prevent 404 errors from search engine listings (and outdated customer bookmarks) and to make sure we don’t lose search engine rankings.
I have attempted to do this with a modification to the .htaccess file with a line such as the following:
RedirectPermanent /support/index.html http://www.<myNEWdomain>.com/products/support.html
This ALMOST works but instead of getting rerouted to:
http://www.<myNEWdomain>.com/products/support.html
I get routed to
http://www.<myNEWdomain>.com/products/support.html?q=support/index.html
And the end result is I get a 404 error.
Anybody have an idea what I can do to get rid of the portion of the URL that is tagged on at the end (in the above case, "?q=support/index.html")? I suppose this might have something to with the Friendly URLs code (pasted below for reference)? Of course, I want to keep the Friendly URLs funtionality.
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
Or does somebody have any other suggestions?
Thanks!