Re: Redirect host

2014-03-06 Thread Igor Sysoev
On Mar 6, 2014, at 21:38 , Tommy Berglund wrote: > 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'

Redirect host

2014-03-06 Thread Tommy Berglund
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;