Welcome Guest, Not a member yet? Register   Sign In
Use function instead of a controller
#5

[eluser]ruiganga[/eluser]
I got the solution as:

Code:
// first in the route I've written
$route['main'] = "main/redirect";
$route['main/(:any)'] = "main/redirect";


//and then in the Main CONTROLLER at Redirect FUNCTION
public function redirect(){
  $goToLink = "http://".base_url()."".$this->uri->segment(2);
  redirect($goToLink);
}

If anyone has a tip to do it more intelligently I appreciate.

I'm starting loving this Tongue

Thanks to CroNiX for pointing me the routes Smile


Messages In This Thread
Use function instead of a controller - by El Forum - 01-25-2014, 03:14 PM
Use function instead of a controller - by El Forum - 01-25-2014, 09:15 PM
Use function instead of a controller - by El Forum - 01-26-2014, 05:05 AM
Use function instead of a controller - by El Forum - 01-26-2014, 05:15 AM
Use function instead of a controller - by El Forum - 01-26-2014, 08:40 AM
Use function instead of a controller - by El Forum - 01-26-2014, 01:07 PM
Use function instead of a controller - by El Forum - 02-06-2014, 11:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB