how to rewrite this: apache to nginx

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


Igor Sysoev wrote:
> On Fri, Aug 29, 2008 at 11:13:20AM +0200, Robert Gabriel wrote:
> 
>> But what about this?
>> 
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule . index.php [L]
> 
>     location / {
>         error_page  404 = /index.php;
>     }

It doesnt work, I was thinking to do it like this:

if (!-f $request_filename) {
 rewrite  .  /index.php  last;
 break;
}

But this doesnt work eider, the website doesnt seems to work and if I 
dont use any rewrite rules I get 404 error and if I use the rules, its 
just messed up.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list