0

我想在同一个站点将一个 url 重定向到一个新的!

旧网址:

 index.php?route=product%2Fproduct&path=63_64_83&product_id=163&pk_campaign=Facebook_Ads&pk_kwd=Alum_i5

新网址:

 http://bit.ly/19xN3Pv

Redirect 301 /index.php?route=product%2Fproduct&path=63_64_83&product_id=163&pk_campaign=Facebook_Ads&pk_kwd=Alum_i5 http://bit.ly/19xN3Pv, _

不工作!还有其他建议吗?

4

2 回答 2

0

启用mod_rewrite.htaccess通过httpd.conf然后将此代码放在您.htaccessDOCUMENT_ROOT目录中:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} ^route=product\%2Fproduct&path=63_64_83&product_id=163&pk_campaign=Facebook_Ads&pk_kwd=Alum_i5$
RewriteRule ^inedx\.php$ http://bit.ly/19xN3Pv [L,NC,R=301]
于 2013-09-23T18:57:10.250 回答
0

[编辑]这应该这样做:

RewriteEngine on
RewriteCond %{QUERY_STRING} route=product%2Fproduct&path=63_64_83&product_id=163&pk_campaign=Facebook_Ads&pk_kwd=Alum_i5
RewriteRule ^index.php.*$    http://bit.ly/19xN3Pv [R=301,L]
于 2013-09-23T18:54:52.977 回答