Mod Proxy | Trailing Slash Issue

If you are using mod_proxy in apache and facing the trailing slash issue i.e. an extra slash is appended after the URL. For instance, if you are hitting http://mydomain.com and it  is getting redirected to http://mydomain.com// then make sure you don’t have a configuration like this.

ProxyPass "/" "http://mydomain.com"
ProxyPassReverse "/" "http://mydomain.com/"

It can be easily fixed by having the trailing slash in both the statements i.e.

ProxyPass "/" "http://mydomain.com/"
ProxyPassReverse "/" "http://mydomain.com/"

I faced this problem recently in one of my projects. I found this fix so shared it.

Hope it helps !! 🙂