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

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -