вопрос по rewrite

RaPaMaN rapaman at virthost.net
Wed Nov 2 00:40:47 MSK 2005


Доброй ночи, Игорь !

А будет ли работать такая конструкция:

        location = / {
        if ( $http_cookie ~* "mega_user" ) {
            rewrite ^.+$ /index.php break;
        }
           rewrite ^.+$ /static/index.html break;
    }

location = /static/index.html {
	internal;
	root blablablabla/bla/bla;
}

location = /index.php {
	internal;
	..... fastcgi ....
}

У меня работает так почему-то, если куки выставлен, то 404-я идет.
А если куки нет, то открывается /static/index.html нормально.

А как задумывалось - не работает, почему-то.

Спасибо.

С Уважением,
Дмитрий.


More information about the nginx-ru mailing list