Answer the question
In order to leave comments, you need to log in
How to get the right kind of uri in codeigniter?
I use three arguments when accessing the controller via _remap
, a link of this format comes out, site.com/art/1/rev/2
respectively 1, rev, 2 - arguments.
I need this format to be converted to this 1.site.com/rev/2
, via routes only works with the first parameter:
$subdom = array_shift((explode(".",$_SERVER['HTTP_HOST'])));
switch ( $_SERVER['HTTP_HOST'] ) {
case $subdom.'.site.com':
$route['default_controller'] = "art/".$subdom;
default:
break;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question