rewrite rule

Max maxbear at gmail.com
Mon Mar 2 17:20:54 MSK 2009


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 :-).

Max

On Sun, Mar 1, 2009 at 11:51 PM, Igor Sysoev <is at 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;
>      }
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090302/1a122549/attachment.html>


More information about the nginx mailing list