Welcome Guest, Not a member yet? Register   Sign In
using parked domains as codeignitaer controllers

Hi , i have an application built on codeigniter, and there is some controllers like this :


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/
CI is nice Heart

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';

echo $_SESSION["resellerID"];
else {
echo 'session is not setted !';

and use this resellerID anywhere i need to get reseller ID,
CI is nice Heart

Theme © iAndrew 2016 - Forum software by © MyBB