Переделка rewrite rule из .htaccess под nginx

Igor Sysoev is at rambler-co.ru
Tue Jul 17 17:17:46 MSD 2007


On Tue, Jul 17, 2007 at 04:34:13PM +0400, Evgeny Stepanischev wrote:

> >> Может поможет кто-то переделать несколько правил с апача на nginx
> 
> >> RewriteCond %{REQUEST_FILENAME} !-f
> >> RewriteCond %{REQUEST_FILENAME} !-d
> >> RewriteRule ^(.*)$ /index.php?path=$1&%{QUERY_STRING}
> 
> >     location / {
> >         error_page  404 = /index.php?path=$uri&$args;
> >     }
> 
> >     location = /index.php {
> >         fastcgi_pass  ...
> >         #proxy_pass   ...
> >     }
> 
> может, лучше через "-e" сделать?

Нет, error_page лучше.


-- 
Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list