Re: Rewrite отрабатывает до auth basic

Igor Sysoev igor at sysoev.ru
Fri Oct 12 08:07:19 UTC 2012


On Fri, Oct 12, 2012 at 04:03:42AM -0400, aquarius wrote:
> В результате решил проблему так:
> 
>         location ~* /admin {
>                 auth_basic              "admin location";
>                 auth_basic_user_file    conf.d/htpasswd;
>                 root /path/to/nowhere;
>                 error_page 404 = @redirect;
>                 }
>         location @redirect {
>                 rewrite ^/([^\/]+)$ /index.php?api=$1;
>                 index index.php;
>         }

Sigh...


-- 
Igor Sysoev
http://nginx.com/support.html



Подробная информация о списке рассылки nginx-ru