6 messages in ru.sysoev.nginxRe: rewrite rule
FromSent OnAttachments
MaxMar 1, 2009 5:58 am 
Igor SysoevMar 1, 2009 7:51 am 
mikeMar 1, 2009 11:36 am 
MaxMar 2, 2009 6:20 am 
MaxMar 2, 2009 6:21 am 
MerlinMar 2, 2009 3:43 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:Re: rewrite ruleActions...
From:Max (maxb@gmail.com)
Date:Mar 2, 2009 6:20:31 am
List:ru.sysoev.nginx

Thanks a lot for the rewrite rule.

I posted the wrong rewrite rule:-( in my origial post. This is the one that I want to change:

RewriteEngine On RewriteBase / RewriteRule ^images/e/(.*)$ http://thumbs.ebaystatic.com/pict/$1 [R,L] RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3&ccid=$4 RewriteRule ^item-(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3 RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2

Could someone help me to make it work? Thanks a lot :-).

On Sun, Mar 1, 2009 at 11:51 PM, Igor Sysoev <is@rambler-co.ru> wrote:

On Sun, Mar 01, 2009 at 09:58:25PM +0800, Max wrote:

I tried to change the following apache rewrite to work under nginx. But it's still not working.

RewriteEngine On RewriteBase / RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3&ccid=$4 RewriteRule ^item-(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3 RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2

Could anyone teach me how can I do it correctly? Thanks a lot.

location /item- { rewrite ^/item-(.*)_(.*)_(.*)_(.*).html$ /auction.php?title=$1&item=$2&country=$3&ccid=$4 last;

rewrite ^/item-(.*)_(.*)_(.*).html$ /auction.php?title=$1&item=$2&country=$3 last;

rewrite ^/item-(.*)_(.*).html$ /auction.php?title=$1&item=$2 last; }