PDA

View Full Version : Virtual Subdomains


MrApples
12-30-2007, 07:01 PM
I've been trying to setup virtual subdomains, and been unsuccessful, but it did do something.

RewriteCond %{HTTP_HOST} !^www\.domain\.com

RewriteRule (.*) http://www.domain.com/subdomains.php?sub=$1 [L,R=301]
This works whenever I punch in "http://domain.com" of course the action is nothing (http://www.domain.com/subdomains.php?sub= ).

But it doesn't work whenever I try a actual subdomain. "blah.domain.com" or "www.blah.domain.com".

Zaiaku
12-31-2007, 08:46 PM
I may be wrong but I think to get this to work is on your server side. You will need a server that allows wild card domains to be used.