how to rewrite this :apache to nginx

Igor Sysoev is at rambler-co.ru
Mon Feb 23 12:41:19 MSK 2009


On Mon, Feb 23, 2009 at 04:20:05AM +0100, Big Bet wrote:

> RewriteEngine On
> Options +Followsymlinks
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^.* - [L,QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^.*/images/(.*)$ /images/$1 [L]

Probably so

     root  ...

     location / {
         ...
     }

     location ~ /images/ {
         error_page  404  @404;
     }

     location @404 {
         rewrite  (/images/.+)$  $1  break;
     }


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





More information about the nginx mailing list