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

You've seen it done on sites like where you would have

I'm wanting to do a similar thing, any subdomain is routed through to the same index.php file.

so will request /home/some/path/to/www (in here is index.php) and will request the same file

I have it working locally, but my server uses cPanel. What would be your guess at the apache conifguration?

share|improve this question
up vote 1 down vote accepted
<VirtualHost *:80>
    DocumentRoot  /home/some/path/to/www 
    ServerAlias *

Something like that, perhaps?

share|improve this answer
worth noting that you'll also need wildcard DNS – James L Aug 12 '10 at 14:06

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.