I am successfully using Apache mod_proxy to reverse proxy a request to testing.com/foo/bar to mybackendservice.com/foo. However, instead of the current url which is shown in the browser : testing.com/foo/bar, I would like to have the url reflect testing.com/foo. How can I achieve this? My mod proxy setup looks something like:
ProxyPass /foo/bar mybackendservice.com/foo
ProxyPassReverse /foo/bar mybackendservice.com/foo
I did also try rewriting the url using:
RewriteEngine on
RewriteRule foo/bar foo [NC]
but this doesn't seeem to work. Is there another way of achieving this?