rewrite

Ash2k - ash2kk at gmail.com
Fri Aug 28 12:44:16 MSD 2009


Вроде бы так должно работать
if ($request_filename !~
\.(js|gif|ico|jpg|jpeg|png|css|swf|html|xml|ppt|mov|txt)$) {
   rewrite ^  /index.php last;
}


28 августа 2009 г. 14:23 пользователь Хордов Роман <rkhordov at yandex.ru>написал:

> if ($request_filename !~
> (js|gif|ico|jpg|jpeg|png|css|swf|html|xml|ppt|mov|txt)) {
>    rewrite ^(.*)$  /index.php;
>    }
> Т.е. все, кроме определенных форматов, перенаправлять на индекс.
> Все работает.
> Перенес nginx/0.6.36 на nginx/0.7.61 и rewrite перестал работать.
>
> [notice] 17573#0: *1
> "(js|ico|gif|jpg|jpeg|png|css|swf|html|xml|ppt|mov|txt)" does not match
> "/var/www/", client: 92.107.11.48, server: 71.151.120.10, request: "GET /
> HTTP/1.1", host: "71.151.120.10"
>
> [notice] 17573#0: *1 "^(.*)$" matches "/", client: 92.107.11.48, server:
> 71.151.120.10, request: "GET / HTTP/1.1", host: "71.151.120.10"
>
> Подскажите, пожалуйста, что не так делаю?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20090828/654ee52a/attachment.html>


More information about the nginx-ru mailing list