I have

# For blog
LoadModule proxy_html_module libexec/mod_proxy_html.so
LoadModule ssl_module libexec/mod_ssl.so
LoadModule xml2enc_module libexec/mod_xml2enc.so
SSLProxyEngine on
ProxyRequests off
ProxyPass /blog https://xxxx.wordpress.com
ProxyPassReverse /blog https://xxxx.wordpress.com
ProxyHTMLEnable On
ProxyHTMLURLMap https://xxxx.wordpress.com /blog
<Location /blog>
  ProxyPassReverse /
  ProxyHTMLEnable On
  ProxyHTMLURLMap / /blog
  RequestHeader    unset  Accept-Encoding
  #LogLevel proxy:debug

Following these guides:




When I visit the URL http://www.xxxx.com/blog/ it doesn't substitute anchor links https://xxxx.wordpress.com/2015/09/16/hello-world/ with /blog.

It works locally, but not in production.

Here is an example of the HTML that goes through the proxy and appears in the browser:

<h1 class="entry-title">
  <a href="https://xxxx.wordpress.com/2015/09/16/hello-world/" rel="bookmark">Hello world!</a></h1>

I also used a different blog host (HostGator) instead of Wordpress.com but it still doesn't work. (Not that this should matter.)

Apache 2.4.16, production: 2.4.10 (?)

migrated from stackoverflow.com Oct 9 '15 at 16:24

This question came from our site for professional and enthusiast programmers.


The links in the response body cant be updated with proxy reference unless there is a feature in target host to return expected URLs or else you need to explicitly manage the links in the response body by additonal coding. More Details..

If its working in dev means there is such config which you are missing in prod.

  • ProxyHTMLURLMap is specifically for that purpose of re-writing URLs in the HTML. – Chloe Oct 3 '15 at 7:04

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.