rewrite help again please :)

Igor Sysoev is at rambler-co.ru
Thu May 14 09:09:02 MSD 2009


On Wed, May 13, 2009 at 11:13:21PM -0500, AMP Admin wrote:

> Moving another apache server to nginx :)
> 
> Can I get some help with this rewrite?? 
> 
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_URI} !^/index.php
> RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
> RewriteRule (.*) index.php
> RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

   location = /index.php {
       fastcgi_pass    ...;
   }

   location ~ (/|\.php|\.html?|\.feed|\.pdf|\.raw|/[^.]+)$ {
       try_files  $uri  $uri/  /index.php;

       fastcgi_pass    ...;
   }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list