redirect subdomain to internal location

chris.percol nginx-forum at nginx.us
Wed May 25 15:43:54 MSD 2011


How would I test for the following subdomains?

www
www4
any other subdomain 

Then redirect each to a corresponding internal location?

I am using the following code to get the 'any other subdomain' but can't
get the redirect to a  location such as @any_subd working?

if ($host ~* "(.*)\.tm2app\.com") {
  set $subd $1;
}

Thanks for your help.

Chris

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,200694,200694#msg-200694




More information about the nginx mailing list