Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Please bear with me while I try to explain some htaccess gymnastics I'd like to perform.

I have this domain:, at

It is serving pages from my public_html folder as expected.

Now, I want to use the following address:

I do not have control over (, however my sysadmin has allowed me to place a .htaccess file in the eamorr folder. I am not allowed, under any circumstances, to place anything else in the eamorr folder for reasons I do not know.

What I want to happen is this:

User navigates to

User is fed some_page.php from (i.e.

I'd like this to be as seamless as possible -- i.e. when a user navigates to they get served some_page.php and are oblivious to the fact that some_page is coming from a different server ( should be in the address bar of the user's browser at all times and not -- my boss "just wants it that way"...

Is this possible to do using .htaccess?

share|improve this question
up vote 3 down vote accepted

It sounds like what you want is what is called a "reverse proxy", and it's a job for Apache's mod_proxy. However, you can't set this up in a .htaccess file -- it has to be done in a different context. Perhaps someone here knows better, but I don't think what you're asking for will be possible with a single .htaccess file alone.

share|improve this answer

Use Apache mod_proxy to point to another server. Apache docs here.

This worked well:

ProxyPass /blog
ProxyPassReverse /blog

But only after the proxy modules were loaded correctly:

LoadModule proxy_module /usr/lib/apache2/modules/
LoadModule proxy_html_module /usr/lib/apache2/modules/
LoadModule proxy_http_module /usr/lib/apache2/modules/


  • Because of CloudFlare I also had to host the blog from a different hostname, not *
  • I added Disallow: / to my Like this search engines will not start indexing in two locations. And search engines will simply ignore blog/robots.txt.
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.