Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a rewrite that under the url will be site but I want it not to change the url in browser to

So after entering in browser I will see site under but in browser it still be

I tried something like:

 RewriteRule (.*) [L]

I put this in virtualhost config of it works but with changing url.

Is there any different way to rewrite http and https in this manner?

EDIT... I'm using LiteSpeedBalancer and is virtualhost only to show (So no contest is under this domain is only to rewrite to

It's complicated and at first I made example with rewriting to to point that those are different virtualhosts.

share|improve this question
So you want to display some other web site's content as if it were your own? I don't think so. – Michael Hampton Aug 17 '12 at 5:45
Both this website are on my server ... and to be honest it wasn't my idea (but developers :/) and I made example2 only to be clear that this are two websites. I will change this – B14D3 Aug 17 '12 at 6:00
Perhaps you should also explain what it is the developers are really trying to do, so we can tell you exactly why it's impossible. :) – Michael Hampton Aug 17 '12 at 6:05
What's wrong with ServerAlias? Or does it need to have an HTTP host header that includes the www? – Shane Madden Aug 17 '12 at 6:09

A workaround is to use frame forwarding in your control panel.

share|improve this answer
could you expand your answer for more details – B14D3 Aug 17 '12 at 7:06

It is possible to achieve what you describe with mod_proxy but as others have commented you need to ask yourself "Why?". This would be a whole lot simpler to virtual host on

In any case, you will need the mod_proxy mod_proxy_http and possibly mod_proxy_html modules loaded

Then something like this in your Apache config

# turn the general proxy off
ProxyRequests Off

# pass requests for / to the backend /www
ProxyPass /

# fix and redirect headers from the back end
ProxyPassReverse /

# fix any domains in cookies from the backend to the frontend.

# fix any cookie paths form /www to the front end /
ProxyPassReverseCookiePath / /www

Then if the html on the backend site still manages to bring back the /www then you can open your can of worms, load mod_proxy_html and try:

ProxyHTMLEnable On
ProxyHTMLURLMap /www /

There's a lot more you can do with mod_proxy_html in the config guide

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.