我想重命名以下网址
http://xyz.website.com/search/sOrder,dt_pub_date/iOrderType,desc
到
http://xyz.website.com/search/sOrder,dt_pub_date/iOrderType,desc/category,111
和
http://xyz.website.com/index.php?page=search<&item=1&city=2...and so on>
到
http://xyz.website.com/index.php?page=search&sCategory=111<&item=1&city=2...and so on>
答案 0 :(得分:0)
对于第一个重定向,这是一个快速解决方案(如果查询是静态的):
RedirectMatch permanent ^/(search/sOrder,dt_pub_date/iOrderType,desc).*$ /search/sOrder,dt_pub_date/iOrderType,desc/category,111
对于第二个:
RewriteCond %{QUERY_STRING} ^page=search(.*)$
RewriteRule ^index.php$ /index.php?sCategory=111%1 [R=301,L]
希望这会对你有所帮助。