Forum Moderators: phranque
RewriteRule ^/test.html$ subdomain.domain.com%2 [P,L] ProxyPass /test.html/ subdomain.domain.com
ProxyPassReverse /test.html/ subdomain.domain.com The redirect and keeping the original URL is working, but every link and images on the redirectetd site is not working.
The links and images are linking to the original domain.
You are going to have to proxy the links and images as well.
How can I do this?
You said that "keeping the original URL is working" - which presumably is being achieved by proxying the request as suggested in your first post? So you would presumably apply the very principle with whatever you are linking to... images etc.
I guess your links are expressed as absolute URLs to mydomain.com?
ProxyPass /test.html subdomain.mydomain.com
ProxyPassReverse /test.html subdomain.mydomain.com
ProxyRequests off
ProxyHTMLURLMap http://subdomain.mydomain.com/ /
<Location />
ProxyPass http://subdomain.mydomain.com/
ProxyPassReverse http://subdomain.mydomain.com/
ProxyHTMLEnable On
ProxyHTMLURLMap / http://subdomain.mydomain.com/
RequestHeader unset Accept-Encoding
</Location>
ProxyRequests off
ProxyHTMLURLMap http://subdomain.mydomain.com/ /test
<Location /test >
ProxyPass http://subdomain.mydomain.com/
ProxyPassReverse http://subdomain.mydomain.com/
ProxyHTMLEnable On
ProxyHTMLURLMap /test http://subdomain.mydomain.com/
RequestHeader unset Accept-Encoding
</Location>
ProxyRequests off
ProxyPass /test/ http://subdomain.mydomain.com/
ProxyHTMLURLMap http://subdomain.mydomain.com/ /test
<Location /test/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /test/
RequestHeader unset Accept-Encoding
</Location> http://subdomain.mydomain.com/images/? [edited by: not2easy at 1:01 pm (utc) on Sep 12, 2016]
[edit reason] unlinked for readability [/edit]