I want my virtualhost "new_target.domain.com" to point via apache reverse proxy to "https://target.com". This works fine but on new_target.domain.com the a hrefs are not correct. They point to https://target.com instead of new_target.domain.com.
"https://target.com/videos/" instead of "https://new_target.domain.com/videos/" or "/videos/"
How is it possible that I remove all the https://target.com references from all URLs so that there only remains "/videos/" in the source files?
Thanks, a lot.
proxy_pass_reverseonly rewrite's HTTP protocol headers and not the HTML response bodies it receives from the upstream server. To rewrite the HTML pages themselves you need something such as http://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html - See for instance https://serverfault.com/a/634923/37681 for a solution – HBruijn Oct 21 '19 at 13:34