重写规则 - 但仅限于某个 url
我的 htacces 中有一个重写规则,它重写 POST http 授权请求并将其转换为 get 请求。但这发生在每个 http auth 请求上。
实际上,我只需要它在访问 www.mysite.com/googlecheckout/api url 时进行重写:
这就是我目前拥有的:
RewriteCond %{HTTP:Authorization} .*
RewriteRule index.php index.php?login=%{HTTP:Authorization}
这确实有效,但它弄乱了其他地方的其他几个页面。
有人知道如何实现这一目标吗?
非常感谢
I have a rewrite rule in my htacces that rewrites POST http authorization requests and converts it in to a get request. But this happens to every http auth request.
I actually only need it to rewrite if it is going to the www.mysite.com/googlecheckout/api url:
This is what I currently have:
RewriteCond %{HTTP:Authorization} .*
RewriteRule index.php index.php?login=%{HTTP:Authorization}
This does work but it messes up a couple of other pages elsewhere.
Any one know how to achieve this?
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个规则:
Try this rule: