Thanks, i'll try it
2009-07-09
Chancey
发件人: Igor Sysoev
发送时间: 2009-07-09 15:10:56
收件人: nginx
抄送:
主题: Re: How to write this rewrite?
On Thu, Jul 09, 2009 at 09:48:54AM +0800, Chancey wrote:
> Hi, guys!
>
> This is Apache's format, how to write in nginx? Thanks a lot.
>
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule !\.(js|ico|gif|jpg|png|css|cgi|html|htm|cert|swf)$ index.php
> php_flag always_populate_raw_post_data On
>
Probably something like this:
location / {
try_files $uri $uri/ /index.php;
fastcgi_pass ...
}
location ~ \.(js|ico|gif|jpg|png|css|cgi|html|htm|cert|swf)$ {
}
--
Igor Sysoev
http://sysoev.ru/en/