See the documentation on
mod_substitute.html. It describes that if you want to access environment variables, then the substitution must begin with ‘expr=’. The doc provides an example for substituting with variables: _expression_ Example <Location
"/">
AddOutputFilterByType SUBSTITUTE text/html
Substitute
"s/example.com/expr=%{HTTP:HOST}/i"
Substitute
"s/Hello, (\S+)/expr=Hello from %{REQUEST_URI}, \$1/i" </Location> Hazarding a guess, you could try prefixing your substituted string with ‘expr=’,
as follows: Substitute "s|src="" style="background:yellow;mso-highlight:yellow">expr=src=""> I’m just reading from the docs and have not tried it myself. Matt. From: Flaviu Radulescu <flaviu.radulescu@xxxxxxxxxxxxx.INVALID>
Dear community, I need an advice on how to configure a reverse proxy in which I need to replace the <img src="" tag from the response html with an ENV variable defined previously. How do you recommend me to do this? I tried with substitute, but unfortunately doesn't seem to support variables. The variable I am setting with the command: SetEnvIf Request_URI "/lp\/([a-zA-Z0-9]*)" st=$1.example.com and now I would like to use the {st} variable in the substitute Substitute "s|src=""> I tried with %{st}e , ${st} in any combination it doesn't work. Is there any way in which I can use e previous defined variable in rewriting the proxy response HTML? Thank you, --- FLAVIU RADULESCU | Lumminary
| lumminary.com
|