RewriteCond 和完整 QUERY_STRING
我很难理解这个问题——它应该是微不足道的。
我想将一个带有特定查询字符串的 URL 重定向到另一个 URL。
我想发送在 URL
http:// 中包含查询字符串的任何请求example.com/index.php?option=com_user&view=register
至:
http://example.com/index.php?option=com_regme&view=form®me=4&random=0&Itemid=6
如果他们在第一个 URL 的末尾添加任何内容,它仍然应该转到第二个 URL,这样他们就无法绕过重定向。第一个查询字符串中的任何内容都不需要保留并传递给第二个查询字符串 - 我只想完全更改 URL。
我正在费尽心思想让它发挥作用,但这应该是微不足道的。
建议?
谢谢,
-蒂姆
I'm having hard time getting my head wrapped around this one - and it should be trivial.
I would like to redirect one URL with a specific query string to another URL.
I want to send any requests that contain the query string in the URL
http://example.com/index.php?option=com_user&view=register
To:
http://example.com/index.php?option=com_regme&view=form®me=4&random=0&Itemid=6
If they add anything to the end of the first URL, it should still go to the second URL so that they cannot bypass the redirection. Nothing in the first query string needs to be preserved and passed to the second - all I want to do is change the URL completely.
I'm tearing my hair out trying to get this to work yet it should be trivial.
Suggestions?
Thanks,
-Tim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于参数可能以任何顺序出现,请尝试以下规则:
Since the parameters may appear in any order, try this rule: