【发布时间】:2010-11-08 10:30:11
【问题描述】:
我们安装了一个新的商店软件,我已经为所有旧页面设置了重定向,但有一个我无法开始工作。如果url包含
cp_tpl=productlist.html
然后我想重定向到主网站。因此,例如旧网址可能是
http://www.gocellular.ca/index.php?cp_tpl=productlist.html&cp_cat=803&cp_sid=1xxxxxx
我想重定向到
www.gocellular.ca
'cp_tpl=productlist.html' 可以在 url 中的任何位置 - 基本上我只想检查字符串 'cp_tpl=productlist.html' 是否包含在 url 中的任何位置,然后重定向。我已经尝试了大约 100 种不同的 .htaccess 重写,但无法让它工作!如果有任何想法,我将不胜感激......谢谢!
【问题讨论】:
-
列出你尝试过的一些 RewriteRules。
-
RewriteRule cp_tpl=productlist\.html http://www.gocellular.ca/ [R,L] 不工作吗? (当然 http: 后面没有空格。)
标签: .htaccess