Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rewrite отрабатывает до auth basic
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 mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|