Forum: NGINX Sub-domain filtering

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 ronin (Guest)
on 2013-08-19 08:05
(Received via mailing list)
I am using the statement is:
if ($ host! = www.mj.com|ci.mj.com) {rewrite ^ / (. *) $
http://www.mj.com/
$ 1 permanent;}
This page contains a redirect loop occurs causing the problem can not
access
the site, I ask you how to handle this statement to be compatible with
multiple subdomains, thank you

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242007,242007#msg-242007
34011bc56457235a2caa5ed1d4a29f3c?d=identicon&s=25 Jonathan Matthews (Guest)
on 2013-08-19 09:14
(Received via mailing list)
On 19 Aug 2013 07:05, "ronin" <nginx-forum@nginx.us> wrote:
>
> I am using the statement is:
> if ($ host! = www.mj.com|ci.mj.com) {rewrite ^ / (. *) $
http://www.mj.com/
> $ 1 permanent;}
> This page contains a redirect loop occurs causing the problem can not
access
> the site, I ask you how to handle this statement to be compatible with
> multiple subdomains, thank you

Use a separate server{} for the redirection-only vhosts.

J
This topic is locked and can not be replied to.