Dynamic Subdomains

Posted by crash on Server Fault See other posts from Server Fault or by crash
Published on 2011-03-11T06:36:43Z Indexed on 2011/03/11 8:12 UTC
Read the original article Hit count: 257

Filed under:
|
|
|

On my new site I want to have dynamic subdomains. I'm trying to make it so that the subdomains use the same web root as the main domain, all under a single CodeIgniter installation. For example, subdomain.example.com would lead to example.com/subdomain, which is actually example.com/index.php/subdomain.

I've already the DNS, virtual hosts set up but I"m getting caught up on the .htaccess.

The effect of the linked htaccess is that when navigating to any subdomain, it gets caught up in an infinite loop. (Error log after one request.) It's the same effect for www., which should just resolve to the main domain.

© Server Fault or respective owner

Related posts about apache

Related posts about mod-rewrite