Welcome Guest, Not a member yet? Register   Sign In
pointing multiple domains to same instance of CI
#2

[eluser]Colin Williams[/eluser]
Assuming Apache:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /path/to/ci/install
    ServerName domain1.com
        ServerAlias domain2.com
    
    <Directory "/path/to/ci/install">
                Options Indexes FollowSymLinks Includes ExecCGI
                AllowOverride All
                Order allow,deny
                Allow from all
    </Directory>
</VirtualHost>

And then in routes:

Code:
$check_host = $_SERVER['SERVER_NAME'];

$route['default_controller'] = "welcome";
if ($check_host == 'domain2.com')
{
   $route['default_controller'] = "other";
}


Messages In This Thread
pointing multiple domains to same instance of CI - by El Forum - 10-06-2008, 09:23 PM
pointing multiple domains to same instance of CI - by El Forum - 10-06-2008, 11:47 PM
pointing multiple domains to same instance of CI - by El Forum - 10-06-2008, 11:56 PM
pointing multiple domains to same instance of CI - by El Forum - 10-07-2008, 12:10 AM
pointing multiple domains to same instance of CI - by El Forum - 10-07-2008, 01:26 AM
pointing multiple domains to same instance of CI - by El Forum - 06-29-2009, 09:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB