Welcome! Log In Create A New Profile

Advanced

Re: convert rule apache to nginx

VovansystemS
February 18, 2013 07:36AM
> RewriteCond %{REQUEST_URI} /(.+?)/pagina-(.+?)/ [NC]
> RewriteRule (.*) /%1/?page=%2 [L,QSA,NC]
итак,
[NC] - (no case) - без учёта регистра
[L] - last|L - Stop the rewriting process immediately and don't apply
any more rules. Especially note caveats for per-directory and
.htaccess context
[QSA] - qsappend|QSA - Appends any query string from the original
request URL to any query string created in the rewrite target.
[NC] - nocase|NC - Makes the pattern comparison case-insensitive

значит, должно быть как-то так:
rewrite ^(/.*)/pagina-(.*)/ $1/?page=$2&$args break;
но такая конструкция получилась чувствительной к регистру

лучше так:
location ~* ^(?<x>/.*)/pagina-(?<y>.*)/ {
rewrite ^ $x/?page=$y&$args break;
}

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

convert rule apache to nginx

senty February 17, 2013 02:56AM

Re: convert rule apache to nginx

Михаил Монашёв February 17, 2013 06:36AM

Re: convert rule apache to nginx

senty February 17, 2013 08:39AM

Re[2]: convert rule apache to nginx

Михаил Монашёв February 17, 2013 09:52AM

Re: convert rule apache to nginx

Anton Yuzhaninov February 18, 2013 06:04AM

Re: convert rule apache to nginx

VovansystemS February 18, 2013 06:30AM

Re: convert rule apache to nginx

VovansystemS February 18, 2013 07:36AM

Re[2]: convert rule apache to nginx

Михаил Монашёв February 18, 2013 09:52AM

Re: Re[2]: convert rule apache to nginx

VovansystemS February 18, 2013 10:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready