我需要重定向这样的页面重定向包括的.htaccess查询字符串
http://www.domain.com/list.php?id=bla&variable2=product1-product2-product3
重定向(值可以在查询字符串更改)
http://www.domain.com/list.html?id=bla&variable2=product1-product2-product3
所有我需要的是它将更改为.html,但其他内容在定制链接上应保持不变。
有帮助吗?
我需要重定向这样的页面重定向包括的.htaccess查询字符串
http://www.domain.com/list.php?id=bla&variable2=product1-product2-product3
重定向(值可以在查询字符串更改)
http://www.domain.com/list.html?id=bla&variable2=product1-product2-product3
所有我需要的是它将更改为.html,但其他内容在定制链接上应保持不变。
有帮助吗?
在list.php文件中执行重定向而不是使用.htaccess文件是不是一个好主意?
如何像:
header('Location: http://www.domain.com/list.html?'+$querystring);
在
list.php
?
把这个放在你的htaccess中,应该就够了。
RewriteRule ^([^.]+).html$ /$1.php [QSA,L]
(顺便说一句,这是没用的,做到这一点...)
那不是一个坏主意.. :) – Andy 2012-07-27 13:55:52
但麻烦的是,我需要让页面外的所有显示器框架规则和重定向...谢谢你的建议。 – Andy 2012-07-27 13:56:27