Welcome! Log In Create A New Profile

Advanced

map & rewrite

November 18, 2015 07:17AM
Доброго время суток, не получается следующая схема:

nginx.conf:

map $args$query_string $admvasya {
default 0;
~do=vasya$ 1;
~do=vasya\b.*$ 1;
~do=vasya*.*$ 1;
~\b.*do=vasya$ 1;
~\b.*do=vasya\b.*$ 1;
~\b.*do=vasya*.*$ 1;
~\b.*\bdo=vasya$ 1;
~\b.*\bdo=vasya\b.*$ 1;
~\b.*\bdo=vasya*.*$ 1;
~do=vasya 1;
do=vasya 1;
}

virt_host.conf:

if ($admvasya = 1) {
rewrite ^/home/(.*)$ /home/admvasya_go_home.php?do=petya&other=87654 last;
}

проверял в $args и $query_string искомые поля присутствуют.
в мапе изложены все варианты пришедшие на ум из темы регекспов...
Subject Author Posted

map & rewrite

den68 November 18, 2015 07:17AM

Re: map & rewrite

Maxim Dounin November 18, 2015 01:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 81
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready