redirect subdomain to internal location

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

How would I test for the following subdomains?

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.


Posted at Nginx Forum:,200694,200694#msg-200694

More information about the nginx mailing list