使用 Apache 的 mod_rewrite 创建别名
我需要为一个确切的页面创建一个别名,不幸的是其中有特殊字符。我确实设置了一个环境,因此其他重定向可以正常工作,但这个不行:
RewriteRule ^/ow/email.htm?who=Kate%20Jones&direct=True&[email protected]$ http://www.google.com/ow/lalala.htm
我应该如何重写此语句才能使其正常工作?
附言。这是我第一次来这里,所以如果我没有正确遵循 stackoverflow 政策,请告诉我;)非常感谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用
RewriteCond
指令 对于 URI 查询,要么检查 QUERY_STRING:或者 THE_REQUEST 中的 rel="nofollow noreferrer">请求行:
You need to use the
RewriteCond
directive for the URI query, either to examine QUERY_STRING:Or the request line in THE_REQUEST: