开发者

Rewrite rule - but only if to a certain url

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/googl开发者_高级运维echeckout/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


Try this rule:

RewriteCond %{REQUEST_METHOD} =POST
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^googlecheckout/api$ index.php?login=%{HTTP:Authorization}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜