Forum Moderators: phranque
You can view the existing discussion here:
[webmasterworld.com...]
Basically, we have a site that used to use MIVA (/Merchant2/ folder variety). The site now uses X-Cart, so we want to setup permanent 301 redirects from each MIVA URL to the corresponding URL in X-Cart.
We've tried setting up an .htaccess file in the /Merchant2/ folder, but that didn't work. Everything we've tried so far hasn't worked; it comes up page not found, or redirects to our custom 404 error page (if directive is present in .htaccess).
Looking for help...
Thanks
Cory
RewriteEngine on
Options +FollowSymLinks
#
RewriteCond %{QUERY_STRING} ^Screen=PROD&Product_Code=product1$
RewriteRule ^merchant\.mv$ http://www.example.com/Product1-p-16133.html [R=301,L]
RewriteRule ^foo\.html$ http://www.example.com/bar.html [R=301,L]
Jim
[edited by: jdMorgan at 9:16 pm (utc) on Nov. 22, 2006]
I'm now seeing a new problem w/ the query string that I need to fix because I don't want Google passing the value to the wrong page or indexing the page with the query string.
Here's what I have in my .htaccess file:
RewriteCond %{QUERY_STRING} ^Screen=PROD&Product_Code=product1$
RewriteRule ^merchant\.mv$ [mywebsite.com...] [R=301,L]
Here's the URL that it's redirecting to (notice the unwanted query string):
[mywebsite.com...]
How do I write the rewrite rule to omit the query string info from the new URL?
Thanks