Posts

Showing posts from January, 2015

for using the subdomain in codeigniter

$subdomain_arr = explode ( '.' , $_SERVER [ 'HTTP_HOST' ], 2); //creates the various parts          $subdomain_name = $subdomain_arr [0]; //assigns the first part          echo $subdomain_name ;

change Routing file for subdomain in codeigniter

switch ( $_SERVER [ 'HTTP_HOST' ]) { case 'subdomain.domain.com' : $route [ 'default_controller' ] = "blog" ; $route [ 'latest' ] = "blog/latest" ; break ; default : $route [ 'default_controller' ] = "main" ; break ; }