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

DNS / apache rookie here..

I've searched for the answer and no luck but it's possible that I don't know what to look for in a solution.

Many subdomains under each redirect to a specific page:


I would rather avoid making any changes to (in order to be backwards compatible). I would like to make things easier for users and create an alias from to the page on

I can do anything necessary to the config situation with

If you don't mind, let me know if this is a poorly described/incomplete question.


share|improve this question

You can't do this with DNS. It would be nice... You'll have to look at doing redirects via the web server, either natively or using the mod_rewrite module to do URL rewrites.

share|improve this answer

If you wanted to just have an alias from to

you can make an .htaccess on the webroot of

Options +FollowSymLinks
rewriteEngine on
rewriteCond %{HTTP_HOST} ^(www\.)?domain1\.com
rewriteCond %{QUERY_STRING} .
rewriteRule (.*) [R=301,L]

Of course your description a little confusing as to what should be backwards compatible (sounds like there will be two systems to go hand in hand) but hopefully little modification (including subdomain check and insertion) to this script will get you where you want to be.

You can put this on vhost.conf as well. Remember to execute a2enmod and AllowOverride All

Cheers, D

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.