Welcome Guest, Not a member yet? Register   Sign In
redirect url helper redirect to localhost
#2

(05-08-2015, 01:53 AM)rtorralba Wrote: Hi,

When a call a redirect url helper function this function as following:

redirect('controller/method');

redirect to http://localhost/index.php/controller/method

If I set base_url variable on config file works correctly and redirect to http://myvirtualhost.com/index.php/controller/method but this not was necessary on codeigniter 2 and can be a problem because we must to define a base_url per environment.

Greetings.

Did you create a route link in config/routes.php

$route['controller/function'] = "controller/function";
$route['controller/function/(:any)'] = "controller/function/$1";

May not be necessary but just checking
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: redirect url helper redirect to localhost - by wolfgang1983 - 05-12-2015, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB