how to rewrite this: apache to nginx

Robert Gabriel lists at ruby-forum.com
Fri Aug 29 13:13:20 MSD 2008


But what about this?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]


Igor Sysoev wrote:
> On Fri, Aug 29, 2008 at 10:54:38AM +0200, Robert Gabriel wrote:
> 
>> RewriteRule ^(.*/)?libs(/|$) - [F,L]
>> RewriteRule ^(.*/)?plugins(/|$) - [F,L]
>> RewriteRule ^(.*/)?storage(/|$) - [F,L]
>> RewriteRule ^(.*/)?templates(/|$) - [F,L]
>> 
>> to nginx?!
> 
> server {
> 
>     root ...
> 
>     location / {
>         error_page  404 = /index.php;
>     }
> 
>     location ~* \.php$ {
>         ...
>     }
> 
>     location ~* ^(.*/)?(\.svn|api|libs|plugins|storage|templates)(/|$) {
>         return  403;
>     }

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list