Welcome! Log In Create A New Profile

Advanced

Re: redirect subdomain to internal location

May 25, 2011 09:22AM
On Wed, May 25, 2011 at 07:43:54AM -0400, chris.percol wrote:
> 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;
> }

Could you describe using examples, but not "if/set" ?
nginx virtual server names are described here:
http://nginx.org/en/docs/http/server_names.html


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirect subdomain to internal location

chris.percol May 25, 2011 07:43AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 08:00AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 09:16AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 09:24AM

Re: redirect subdomain to internal location

Igor Sysoev May 25, 2011 09:22AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 10:26AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:10AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:18AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:22AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 02:14PM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 03:04PM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 04:34AM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 06:47AM

Re: redirect subdomain to internal location

António P. P. Almeida May 26, 2011 07:06AM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 239
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready