#StackBounty: #nginx #mod-rewrite #rewrite #url nginx rewrite url without changing browser address

Bounty: 100

I want to change the url of a request but the browser address should not change.
To achieve this I have tried the below configuration:

location /my-website {          

    proxy_pass  http://tomcat/my-website;
}

location =/my-website { 

        rewrite /my-website$(.*) $1/my-website/mypage/index.html last;

}

Although doing this the request does get the correct address but the address bar of the browser also changes.

Any suggestion(s) on improving this configuration?

Things tried :


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.