legacytack
06-24-06, 09:15 PM
Ok, I am trying to redirect my old Miva 4 pages to the new Miva 5 pages using mod_rewrite. When I just redirect the whole folder it works:
RewriteRule ^/Merchant2/(.*)$ /mm5/$1 [R=301]
But I used the Copernicus Search Friendly Links for my MM4 store, and I have done the rewrite for directory style links for MM5. I want the MM4 short links to redirect to the MM5 short links. The best way I came up with is the redirect MM4 SFL to MM4 regular links, and then MM4 regular links to MM5 short links, but it doesn't work. Here is the code I used:
RewriteRule ^/Merchant2/merchant.mvc?page=LT/CTGY/(.*)$ /Merchant2/merchant.mvc?Screen=CTGY&Category_Code=$1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?page=LT/PROD/(.*)/(.*)$ /Merchant2/merchant.mvc?Screen=PROD&Product_Code=%2&Category_Code=%1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?page=LT/PROD/(.*)$ /Merchant2/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=(.*)&Store_Code=LT$ /c/$1/ [R=301]
RewriteRule ^/Merchant2/merchant.mvc?Screen=PROD&Product_Code=(.*)&Category_Code=(.*)&Store_Code=LT$ /pc/$1/$2/ [R=301]
RewriteRule ^/Merchant2/merchant.mvc?Screen=PROD&Product_Code=(.*)&Store_Code=LT$ /p/$1/ [R=301]
Can anyone tell me what I'm doing wrong? Thanks!
RewriteRule ^/Merchant2/(.*)$ /mm5/$1 [R=301]
But I used the Copernicus Search Friendly Links for my MM4 store, and I have done the rewrite for directory style links for MM5. I want the MM4 short links to redirect to the MM5 short links. The best way I came up with is the redirect MM4 SFL to MM4 regular links, and then MM4 regular links to MM5 short links, but it doesn't work. Here is the code I used:
RewriteRule ^/Merchant2/merchant.mvc?page=LT/CTGY/(.*)$ /Merchant2/merchant.mvc?Screen=CTGY&Category_Code=$1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?page=LT/PROD/(.*)/(.*)$ /Merchant2/merchant.mvc?Screen=PROD&Product_Code=%2&Category_Code=%1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?page=LT/PROD/(.*)$ /Merchant2/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Code=LT
RewriteRule ^/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=(.*)&Store_Code=LT$ /c/$1/ [R=301]
RewriteRule ^/Merchant2/merchant.mvc?Screen=PROD&Product_Code=(.*)&Category_Code=(.*)&Store_Code=LT$ /pc/$1/$2/ [R=301]
RewriteRule ^/Merchant2/merchant.mvc?Screen=PROD&Product_Code=(.*)&Store_Code=LT$ /p/$1/ [R=301]
Can anyone tell me what I'm doing wrong? Thanks!