从网址中删除参数 [英] removing parameters from url
本文介绍了从网址中删除参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在真实网址后删除参数,然后重定向到不带此参数的相同网址
i want to remove a parameter after the true url then redirection to the same url without this parameter
示例:
我要从
http://www.mysite.com/123.html?r=1
并重定向到
http://www.mysite.com/123.html
使用htaccess和301重定向
using htaccess and 301 redirect
谢谢
推荐答案
试试这个:
RewriteRule ^123.html.? 123.html? [L]
请注意第二个网址如何以结尾?
,这将删除查询字符串。
Note how the second url ends with a ?
, this removes the query string.
源: http://wiki.apache.org/httpd/RewriteQueryString
这篇关于从网址中删除参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文