rewrites

Igor Sysoev igor at sysoev.ru
Mon Oct 10 18:22:09 UTC 2011


On Mon, Oct 10, 2011 at 01:43:34PM +0200, Juergen Gotteswinter wrote:
> Hi,
> 
> i need to translate this htaccess to nginx:
> 
> 
> RewriteCond %{QUERY_STRING} !^/?url
> RewriteCond %{QUERY_STRING} !^/?auto
> RewriteRule ^(.*)$ /?url=$1 [L]
> 
> 
> is this the right solution?
> 
> if ($args !~ "^/?url"){
> 	set $rule_0 1$rule_0;
> }
> if ($args !~ "^/?auto"){
> 	set $rule_0 2$rule_0;
> }
> if ($rule_0 = "21"){
> 	rewrite ^/(.*)$ /?url=$1 last;
> }

Are you sure, that your requests are somethig like "/some/page?/?auto=1" ?
Could you explain what you want to get ?


-- 
Igor Sysoev



More information about the nginx mailing list