All subdomains routed to same DocumentRoot, apache config
        Posted  
        
            by 
                ed209
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by ed209
        
        
        
        Published on 2010-08-12T13:25:11Z
        Indexed on 
            2010/12/22
            4:55 UTC
        
        
        Read the original article
        Hit count: 411
        
You've seen it done on sites like basecamphq.com where you would have username.basecamphq.com
I'm wanting to do a similar thing, any subdomain is routed through to the same index.php file.
so username1.example.com will request /home/some/path/to/www (in here is index.php) and username2.example.com will request the same file
I have it working locally, but my server uses cPanel. What would be your guess at the apache conifguration?
© Server Fault or respective owner