using parked domains as codeignitaer controllers |
Hi , i have an application built on codeigniter, and there is some controllers like this :
mainsite.com/resellers/controller_a/method_a/input/resellerID that resellers is directory , controller_a is name of controller and method_a is name of function and input is posted input values, and resellerID is id of reseller, how i can have this : mainsite.com/resellers/controller_a/method_a/input/1 equals to otherdomain1.com//controller_a/method_a/input/ mainsite.com/resellers/controller_a/method_a/input/2 equals to otherdomain2.com//controller_a/method_a/input/ mainsite.com/resellers/controller_a/method_a/input/3 equals to otherdomain3.com//controller_a/method_a/input/ ....
ressan.ir
CI is nice
i find this way but i don't know it is right solution or not,
i can set some rules into route.php configuration file, like this : if ($_SERVER['HTTP_HOST']=="otherdomain1.com") { $_SESSION['resellerID'] = '123'; } if(isset($_SESSION["resellerID"])){ echo $_SESSION["resellerID"]; } else { echo 'session is not setted !'; } and use this resellerID anywhere i need to get reseller ID,
ressan.ir
CI is nice |
Welcome Guest, Not a member yet? Register Sign In |