1

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
</Location>

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.

Raffael Luthiger
  • 2,001
  • 2
  • 17
  • 26

1 Answers1

0

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.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47