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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -