Can nginx do this?
Igor Sysoev
is at rambler-co.ru
Fri Aug 7 13:07:23 MSD 2009
On Fri, Aug 07, 2009 at 04:52:52PM +0800, lhmwzy wrote:
> 2009/8/7 Igor Sysoev <is at rambler-co.ru>:
> > On Fri, Aug 07, 2009 at 03:10:10PM +0800, lhmwzy wrote:
> >
>
> > server {
> > server_name ~^(.*)\.afen\.com$;
> > rewrite ^ http://www.afen.com/$1$request_uri?;
> > }
> >
> >
> > --
> > Igor Sysoev
> > http://sysoev.ru/en/
> >
> >
>
> should
>
> server_name ~^(.*)\.afen\.com$;
> set $name $1;
> rewrite ^ http://www.afen.com/$name$request_uri?;
>
> or has error:
> [emerg]: pattern "^" has less captures than referrenced in
> substitution "http://www.afen.com/$1$request_uri" in
> /usr/local/etc/nginx/nginx.conf:447
Yes, you are right.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list