[CentOS] How to Auto Add forward slash "/" when accessing a link/url through ProxyPass

ankush grover

ankushcentos at gmail.com
Sun Jul 6 10:24:30 UTC 2008


Hi Friends,

I am using Centos 5.2 and using ProxyPass to access applications
running on other servers. Everything is working fine except for one of
the applications I need to auto add forward slash when any user tries
to access that application. For ex

ProxyPass   /testdiary                http://testdiary.example.com/
ProxyPassReverse /testdiary       http://testdiary.example.com/

If somebody access directly http://testdiary.example.com/ everything
is coming means the login page but when the same link is accessed
through apache server on which proxypass is running then the login
page does not appear(http://portal.example.com/testdiary). How can I
auto add "/" when somebody put the url
http://portal.example.com/testdiary which should first be
converted/redirected to http://portal.example.com/testdiary/ (auto
added forward slash).

I have the below lines added in httpd.conf file

RewriteEngine On
RewriteCond %{REQUEST_URI} /testdiary
RewriteRule /testdiary(.)$ /testdiary/
ProxyPass /testdiary  http://testdiary.example.com/
ProxyPassReverse /testdiary  http://testdiary.example.com/

Please let me know if you need any other information.

Regards

Ankush



More information about the CentOS mailing list