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
</Location>
Following these guides:
http://www.apachetutor.org/admin/reverseproxies
https://httpd.apache.org/docs/trunk/mod/mod_proxy.html
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 (?)