1

古い製品 ID を新しい ID にリダイレクトしたいと考えています。

例: h*tp://www.mysite.com/index.php?route=product/product&product_id=50 から: h*tp://www.mysite.com/index.php?route=product/product&product_id =80

また

差出人: h*tp://www.mysite.com/index.php?route=product/product&path=63_64_83&product_id=163 宛先: h*tp://www.mysite.com/index.php?route=product/product&path =63_64_83&product_id=175

ありがとうございました :)

4

2 に答える 2

0

.htaccessこれをあなたのウェブルートに追加してください/

RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} (^|.*?&)product_id=50(&.*|$) [NC]
RewriteRule ^(.*)$ $1?%1product_id=80%2 [R=301,L]

RewriteCond %{QUERY_STRING} (^|.*?&)product_id=163(&.*|$) [NC]
RewriteRule ^(.*)$ $1?%1product_id=175%2 [R=301,L]
于 2013-08-08T12:32:00.097 に答える