开发者

Rewrite rule - but only if to a certain url

开发者 https://www.devze.com 2023-01-22 18:08 出处:网络
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 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

精彩评论

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