I have here a very strange problem with mod_proxy_html. The HTML code which gets parsed looks like this:

<a href="/old/something.html" style="background-image:url('/old/images/background.png')">link</a>

Our configuration looks like this:

ProxyPass /  ajp://localhost:9000/webapp/
<Location />
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyPassReverse /
ProxyHTMLExtended On

ProxyHTMLURLMap /old/ /new/

RequestHeader unset Accept-Encoding

And in the module config file I added this:

ProxyHTMLLinks  a               href style

From my understanding this should now filter the HREF and the STYLE attribute. But it only filters the HREF. Can anybody explain me why?

It is the httpd version 2.4.6.


I suspect that you need to wrap the ProxyHTMLLinks directive within a <Location />...</Location>, the same as ProxyHTMLURLMap. When ProxyHTMLURLMap is invoked, it may override your previous ProxyHTMLLinks a directive with a default version that rewrites href but not style.

  • Sadly no. I tried it now and it didn't change anything at all. – Raffael Luthiger Sep 17 '14 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.