Hi Luca,

I tried ProxyHTMLUrlMap, it has side effects making me to switch to Substitute. 
ProxyHTMLEnable=ON makes all responses chunked, even not html, i.e. Java applet 
jars got chunked and applets do not load properly after this. A few other 
things make mod_substitute a better option.

Thanks,
Vlad  

From: Luca Toscano 
Sent: Friday, November 24, 2017 1:06 PM
To: users@httpd.apache.org 
Subject: Re: [users@httpd] Using variables with mod_substitute to rewrite 
dynamically

Hi Vlad,


2017-11-23 16:29 GMT+01:00 Vlad Liapko <vlia...@gmail.com>:

  Hi,

  I’m trying to substitute a server name dynamically in xml responses
  Substitute s|http://blah.com|${SERVER_NAME}|n
  to now success. Apache complains conf variable is not defined, but it is 
there in VirtualHost.

  So far I was able only to use <IF> and put a specific substitute for a 
specific host. The reason I need it dynamically is that I have thousands of 
proxy rules through <Location> directives, I want to be able move those rules 
from one environment to another without updating a hardcoded value.


I don't think that mod_substitute works with expressions, have you tried 
https://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html#proxyhtmlurlmap ?

Luca 

Reply via email to