FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-06-2008, 10:24 AM
"ankush grover"
 
Default How to Auto Add forward slash "/" when accessing a link/url through ProxyPass

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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-06-2008, 02:48 PM
"Filipe Brandenburger"
 
Default How to Auto Add forward slash "/" when accessing a link/url through ProxyPass

Hi,

It's been long since I don't write Proxy rules, but IIRC you have to
match /s on the left side and on the right side.

On Sun, Jul 6, 2008 at 6:24 AM, ankush grover <ankushcentos@gmail.com> wrote:
> ProxyPass /testdiary http://testdiary.example.com/
> ProxyPassReverse /testdiary http://testdiary.example.com/

Maybe try:

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

Or:

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

I guess the second one is the one you want, but it won't do the
Redirect if you access /testdiary without the ending slash. You don't
need mod_rewrite for that one, a simple RedirectMatch should be enough
(I'm not 100% sure about the syntax though):

RedirectMatch /testdiary$ /testdiary/

Please let us know how that goes for you.

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org