logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Redirect to subdomain and keep original URL in address bar
Author
Shizuka



Joined: 01 Sep 2016
Posts: 2

PostPosted: Thu 01 Sep '16 16:46    Post subject: Redirect to subdomain and keep original URL in address bar Reply with quote

Hello,

I am looking for following solution. I have a domain called mydomain.com and want to redirect to my subdomain mysubdomain.mydomain.com and keeping the original url in the address bar.

I tried it with RewriteRule :
Code:
RewriteRule ^/test.html$ subdomain.domain.com%2 [P,L]


and

ProxyPass:
Code:
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.

Can anyone say what I am doing wrong and advice me?

Thank you.
Shizuka
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 07 Sep '16 17:05    Post subject: Reply with quote

there is mod_proxy_html to rewrite the urls.
Back to top
Shizuka



Joined: 01 Sep 2016
Posts: 2

PostPosted: Wed 21 Sep '16 20:57    Post subject: Reply with quote

Hi,

I tried it with mod_proxy_html.
Lots of images are loading but not all.

ProxyRequests Off
ProxyPass /life/ http://my.life.de/
ProxyHTMLURLMap http://my.life/ /life

<Location /life/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /life/
RequestHeader unset Accept-Encoding
</Location>

There are some images under my.life.de/Images or my.life.de/Content which can not be load.

Any Suggestion?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 11 Oct '16 21:39    Post subject: Reply with quote

Use ProxyPass and ProxyPassReverse also you can add that a second time for the Images url
Back to top


Reply to topic   Topic: Redirect to subdomain and keep original URL in address bar View previous topic :: View next topic
Post new topic   Forum Index -> Apache