Welcome! Log In Create A New Profile

Advanced

Антихотлинк : valid_referers and regexp

October 26, 2009 12:48PM
Здравствуйте, для задания имени виртуального использую регулярное выражение
server_name ~^(www\.)?(.+\.)?(.+\..+)$;
set $mdomain $3;
set $sdomain $2;

если использовать такую конструкцию
[code]
valid_referers none blocked server_names;
if ($invalid_referer) {
return 403;
}
[/code]

То материцца следующим образом
[emerg]: the "none" or "blocked" referers are specified in the "valid_referers" directive without any valid referer

А при использовании нижней конструкции, антихотлинк не работает.
[code]
valid_referers none blocked $sdomain$mdomain www.$sdomain$mdomain;
if ($invalid_referer) {
return 403;
}
[/code]

Не подскажите как можно вікрутиться?
Subject Author Posted

Антихотлинк : valid_referers and regexp

Crazy October 26, 2009 12:48PM

Re: Антихотлинк : valid_referers and regexp

Crazy October 26, 2009 01:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 276
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