Welcome! Log In Create A New Profile

Advanced

Re: rewrites

October 10, 2011 02:24PM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrites

JG October 10, 2011 07:44AM

Re: rewrites

Igor Sysoev October 10, 2011 02:24PM

Re: rewrites

locojohn October 10, 2011 04:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 290
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready