You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jack Saunders <ja...@gmail.com> on 2007/02/27 21:47:19 UTC
[users@httpd] mod_proxy_html issue
I am running Apache/2.0.59 with mod_proxy and mod_proxy_html on
windows 2003. The issue I am facing is certain types of embedded
links are absolute and the OutputFilter proxy-html is causing more
harm than good.
Below is a snippet of the relevant httpd config info:
#######################################################
ProxyPass /testapp/ http://internalserverA.com/testapp/
ProxyHTMLURLMap http://internalserverA.com/ /testapp
<Location /testapp/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /testapp/
ProxyHTMLURLMap /testapp /testapp
ProxyHTMLLogVerbose On
</Location>
########################################################
These type of links are fixed! Excellent!
<a href="/logo.jpg">
<a href="http://internal1.example.com/logo.jpg">
-------------------------------------------------------------------------------------------------
This link is still a problem.
<a href="/images/logo.jpg">
The OutputFilter rewrites the link to <a href="/testapp/images/logo.jpg">
This breaks everytime. Does anyone have a solution for this type of
absolute link?
I know the app developers should recode but I donot have much choice
at the moment.
Any help is great appreciated
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_proxy_html issue
Posted by Jack Saunders <ja...@gmail.com>.
Nick, Thanks for a solution. Just trying to understand the logic
behind the filter is half the battle.
Here is what I did to resolve the issue:
############################################################
ProxyPass /testapp/ http://internalserverA.com/testapp/
ProxyHTMLURLMap http://internalserverA.com/ /testapp
ProxyPass /images/ http://internalserverA.com/images/
ProxyHTMLURLMap http://internalserverA.com/ /images
<Location /testapp/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /testapp/
ProxyHTMLURLMap /testapp /testapp
ProxyHTMLURLMap /images /images
ProxyHTMLLogVerbose On
</Location>
<Location /images/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /images/
ProxyHTMLURLMap /images /images
ProxyHTMLLogVerbose On
</Location>
##############################################################
On 2/27/07, Nick Kew <ni...@webthing.com> wrote:
> On Tue, 27 Feb 2007 15:47:19 -0500
> "Jack Saunders" <ja...@gmail.com> wrote:
>
> > This link is still a problem.
> > <a href="/images/logo.jpg">
> >
> > The OutputFilter rewrites the link to <a
> > href="/testapp/images/logo.jpg"> This breaks everytime.
>
> So add a URLMap to rewrite /images to whatever you want it to become.
>
> --
> Nick Kew
>
> Application Development with Apache - the Apache Modules Book
> http://www.apachetutor.org/
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_proxy_html issue
Posted by Nick Kew <ni...@webthing.com>.
On Tue, 27 Feb 2007 15:47:19 -0500
"Jack Saunders" <ja...@gmail.com> wrote:
> This link is still a problem.
> <a href="/images/logo.jpg">
>
> The OutputFilter rewrites the link to <a
> href="/testapp/images/logo.jpg"> This breaks everytime.
So add a URLMap to rewrite /images to whatever you want it to become.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org