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 change. If I set up rewrite it works, but it rewrites url in browser too.

|if ($host = "www.anotherhost.com") { rewrite ^ http://www.somehost.com/someurl; }|


Is it possible to redirect preserving url ?

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to