在Apache反向代理中,如何用变量的值替换某些HTML内容?

时间:2019-05-21 15:56:09

标签: apache reverse-proxy substitution

我已将Apache 2.4设置为Ubuntu 18.04上的反向代理。 我想用一个变量值替换一些HTML内容(由后端服务器返回),例如replace:

   "url(/images/image.png)" by 
   "url($var/images/image.png)" , 
     

其中$ var是使用SetEnvIf指令设置的变量。

我尝试过:

   - mod_substitute. It doesn't support variables.
   - mod_sed. I've tried as the documentation says nothing about variables, but I couldn't make it work.
   - mod_line_edit seems obsolete and I couldn't find the mod_line_edit.so on the Web for Ubuntu 18.04.

任何帮助将不胜感激。

泡菜

0 个答案:

没有答案