Re: Nginx redirect preserving source hostname

2017-04-04 Thread Francis Daly
On Mon, Apr 03, 2017 at 02:17:19PM +0600, Игнатенко Максим wrote: Hi there, > I have an NGINX as reverse proxy with PHP-fpm. Nginx is set up for > serving www.somehost.com. I added another host www.anotherhost.com. > Now I need to setup redirect in this way: If user type > www.anotherhost.com the

Nginx redirect preserving source hostname

2017-04-03 Thread Игнатенко Максим
I have an NGINX as reverse proxy with PHP-fpm. Nginx is set up for serving www.somehost.com. I added another host www.anotherhost.com. Now I need to setup redirect in this way: If user type www.anotherhost.com then it redirects to www.somehost.com/someurl, but url in browser bar shouldn't chang