rewrites

Juergen Gotteswinter jg at internetx.de
Mon Oct 10 11:43:34 UTC 2011


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;
}

cheers,

juergen



More information about the nginx mailing list