Need to remove folder name from URL

strtwtsn nginx-forum at nginx.us
Wed Feb 11 14:22:23 UTC 2015


Hi

We're using proxy_pass to silently forward a website to a different URL.


Here is the code

location ^~/<folder name> {
proxy_pass http://www.example.org/<folder name>;
}

So let's say the site is example1.org.

Going to www.example1.com/<folder name>/history correctly shows that page
that would be visibile at

www.example.org/<folder name>/history but I need to remove the folder name
making it

www.example1.org/history.

How can I do this?

Thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,256577,256577#msg-256577



More information about the nginx mailing list