Welcome Guest, Not a member yet? Register   Sign In
Can anybody help me with subdomain -> uri value mod_rewrite?
#4

[eluser]BadZombi[/eluser]
Just as a followup resolution post...

didn't get my way with htaccess but this will work just fine

Code:
function index(){
     $subdomain_arr = explode('.', $_SERVER['HTTP_HOST']);
     if(count($subdomain_arr) == 3){
          $this->load->model('amodel');
          $check = $this->amodel->check_valid_subdomain($subdomain);
          if(!$check){
               redirect('http://mydomain.com');
          }
          //else it has a valid subdomain so do subdomain stuff:

     } else {
          //no subdomain... do regular stuff
     }
}


Messages In This Thread
Can anybody help me with subdomain -> uri value mod_rewrite? - by El Forum - 04-20-2012, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB