How in Nginx to do rewrite without changing URL in address bar -
How in Nginx to do rewrite without changing URL in address bar -
i've been trying rewrite in nginx: domain.com/one/two -> onetwo.domain.com. url user sees should not changed in address bar.
this code not work correctly - changes url in address bar
rewrite ^/one/two/ http://onetwo.domain.com/ last;
what solution must there? thanks.
this isn't possible, because you're changing hostnames. browser security tied it, webserver configuration.
you can rewrite urls within same hostname, changing hostnames requires redirect or using frame.
nginx
Comments
Post a Comment