wildcard redirect

Igor Sysoev is at rambler-co.ru
Wed Aug 12 13:24:53 MSD 2009


On Wed, Aug 12, 2009 at 11:21:13AM +0200, Juergen Gotteswinter wrote:

> Hi Igor,
> 
> i got something like
> 
>   server {
>         listen  xxx:80;
>         server_name www.xxx.com xxx.com login.xxx.com;
> 
>         rewrite ^ https://login.xxx.com$request_uri permanent;
>     }
> 
> if i add *.xxx.com, or remove the other entries in server_name and just 
> leave *.xxx.com i get a redirect loop?

No, since the redirect is to :443, but the server listens on :80.

> sorry, but i'm lil bit confused now :)
>
> Igor Sysoev wrote:
> >On Wed, Aug 12, 2009 at 09:20:37AM +0200, Juergen Gotteswinter wrote:
> >
> >>Hello Folks,
> >>
> >>is there a way to do a wildcard redirect like
> >>
> >>*.blafoo.com -> alwaysthis.com
> >>
> >>?
> >
> >server {
> >    server_name  *.blafoo.com;
> >    rewrite      ^  http://alwaysthis.com/;
> >}
> >
> >
> 
> 

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





More information about the nginx mailing list