wildcard redirect

Juergen Gotteswinter jg at internetx.de
Wed Aug 12 13:21:13 MSD 2009


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?

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/;
> }
> 
> 







More information about the nginx mailing list