Re: Re: How to write this rewrite?

Chancey chanceycn at gmail.com
Thu Jul 9 11:34:32 MSD 2009


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.
> 
> <IfModule mod_rewrite.c>
> 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
> </IfModule>
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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090709/7c1c29c4/attachment.html>


More information about the nginx mailing list