3 messages in ru.sysoev.nginxApache rewrite in Nginx format
FromSent OnAttachments
Philip MurraySep 25, 2007 9:18 pm 
Igor SysoevSep 26, 2007 4:13 am 
Philip MurraySep 26, 2007 7:04 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Apache rewrite in Nginx formatActions...
From:Philip Murray (pmur@public.gmane.org)
Date:Sep 25, 2007 9:18:20 pm
List:ru.sysoev.nginx

Hi,

Is it possible to express the following Apache rewrite rule in Nginx?

RewriteCond %{QUERY_STRING} !^nobranding$ RewriteCond %{REQUEST_FILENAME} ^/assets/XL/([^.]+)\.([jpegif]+)$ RewriteCond /usr/local/www/assets-nz/XL/%1.branded.%2 -f RewriteRule ^/([^.]+)\.([jpeg]+)$ /$1.branded.$2

In Nginx, this would be in a location block with an alias, so

location /assets { alias /usr/local/www/assets-nz/;

... rewrites go here ... }

But, I understand you can't rewrite with an alias present? So how can I implement the above Apache rewrite?

Cheers