我想将网址重定向到同一网站的新网址!
旧网址:
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
,
不起作用! 还有其他建议吗?
答案 0 :(得分:0)
[edit] 这应该:
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]
答案 1 :(得分:0)
启用mod_rewrite
和.htaccess
到httpd.conf
,然后将此代码放在.htaccess
DOCUMENT_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]