Welcome! Log In Create A New Profile

Advanced

Redirect host

Tommy Berglund
March 06, 2014 12:40PM
I have a question, is this the best way to perform this action?

Only allow https://webmail.exampel.com in the server block ssl
and redirect any host that isn't webmail.example.com to the example.com

if ($host !~* 'webmail.example.com' ) {
rewrite ^/(.*)$ http://example.com/$1 permanent;
}


nginx version: nginx/1.4.5 (Ubuntu)

//Tommy

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

Redirect host

Tommy Berglund March 06, 2014 12:40PM

Re: Redirect host

Igor Sysoev March 06, 2014 01:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 231
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