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 would like to manage subdomains exclusively through .htaccess.

I am able to catch subdomains that I set up - for example, - currently, I redirect that to

What I would like to do is retain the subdomain, even after the redirect - so seems to stay in the address bar for the user, even though it is actually located at

Should I maintain another .htaccess file in /support that rewrites the address?


share|improve this question

migrated from Aug 31 '10 at 18:56

This question came from our site for computer enthusiasts and power users.

Sounds like a potential question for Server Fault – KronoS Aug 31 '10 at 16:46
This sounds like a job for mod_rewrite! – sysadmin1138 Aug 31 '10 at 17:13

You need to setup reverse proxy in the virtual domain

Load following modules into your apache: mod_proxy, mod_proxy_http

ProxyPass /
<Location />
  ProxyPass /

Just a warning: expect some fiddling around making your application work correctly behind reverse proxy - some more reading can be found on mod_proxy_html apache docs and mod_proxy_html homepage.

share|improve this answer

Your Answer


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