httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Cline <wi...@us.ibm.com>
Subject [users@httpd] Problem substituting URIs using mod_proxy_html
Date Wed, 15 Sep 2004 18:29:19 GMT
I am having a problem matching and substituting some URIs contained in 
JavaScripts using mod_proxy_html.  I am a novice at Regular Expressions (I 
am on chapter 3 of the book)   so I would guess that is where my problem 
is:

Here is the scenario - I am trying to substitute a full URL 
(https://revproxy.testcompany.com/mail that will go back through my 
reverse proxy) where the JavaScript has a partial URI (/mail/).  Oddly I 
successfully match and substitute on the first 4 occurrences within the 
page but none after that.  Thanks for any help you can offer!!!

httpd.conf (snippet of Reverse Proxy directives):

#Will's Proxy directives
ProxyHTMLLogVerbose On
LogLevel Info
SetOutputFilter proxy-html
ProxyHTMLExtended On
ProxyPass /wps/ http://at-linyweasvr01.testcompany.com/wps/
ProxyPassReverse /wps/ http://at-linyweasvr01.testcompany.com/wps/
ProxyPass /mail/ http://mailserver1.testcompany.com/mail/
ProxyPassReverse /mail/ http://mailserver1.testcompany.com/mail/
ProxyPass /icon/ http://mailserver1.testcompany.com/icon/
ProxyPassReverse /icon/ http://mailserver1.testcompany.com/icon/
ProxyHTMLURLMap http://mailserver1.testcompany.com 
https://revproxy.testcompany.com
ProxyHTMLURLMap [^http://mailserver1.testcompany.com]/mail 
https://revproxy.testcompany.com/mail -R

I used the last line above to substitute for the URI so I would not cycle 
through and substitute everything for the rule preceding it (is that 
correct? otherwise I get lots of recurring strings)


Here is an example of a successful substitution - from view source in the 
browser

  var 
url=https://revproxy.testcompany.com/mail/testuser.nsf/38d46bf5e8f08834852564b500129b2c/c739f61504e2b27185256ecb00409893?OpenDocument&ui=webmail&Click="

+ v;

when ProxyHTMLURLMAP processed this script:

var 
url="/mail/testuser.nsf/38d46bf5e8f08834852564b500129b2c/c739f61504e2b27185256ecb00409893?OpenDocument&ui=webmail&Click="

+ v;

Here is an example of an unsuccessful substitution -from view source in 
the browser: (which occurred in the same page as the above successful 
substitution)

<param name="Action1" value="New 
Memo,/mail/testuser.nsf/act_NEW.GIF?OpenImageResource,1,0,1,1,0">

resulted in no substitution

I tested the above link to make sure that the full URL through the reverse 
proxy would retrieve the GIF and it did.

Will Cline
IBM Corporation
Advanced Technical Support for Pervasive Computing
4200 Frost Ct
Raleigh, N.C. 27609
919-877-3942 or tieline 254-3942

Mime
View raw message