Welcome Guest, Not a member yet? Register   Sign In
subdomains, htaccess, dns wildcards and codeignitor all on the fly
#6

[eluser]A83[/eluser]
I'm doing the same thing. The user gets username.domain.com as it's url.

I've set up DNS, .htaccess and get sub domains to go to a different controller than the top domain.

I've got routing that looks like this:

Code:
if($_SERVER['HTTP_HOST'] == "www.domain.com" || $_SERVER['HTTP_HOST'] == "domain.com")
{

// Routes for domain.com

$route['default_controller'] = "domain";

} else {

// Routes for *.domain.com

$route['default_controller'] = "sub";

}

How do I send the user as a "variable" to the sub controller?

Thanks in advance!


Messages In This Thread
subdomains, htaccess, dns wildcards and codeignitor all on the fly - by El Forum - 01-22-2010, 01:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB