redirect url helper redirect to localhost |
(05-13-2015, 08:03 AM)rtorralba Wrote: When base_url is not set redirect('controller/method') redirect to http://localhost/index.php/controller/method, the other projects in ci 2 redirect to the current domain (http://example.dev/index.php/controller/method). The localhost value would seem to point to the else condition here: https://github.com/bcit-ci/CodeIgniter/b...ig.php#L72 Are you using 2.2 for your CI2 projects, or an earlier version? 2.2 and 3.0 use the same code for this particular section, and I can't really figure out where the localhost would come from, otherwise. The big difference between <=2.1 and >=2.2 on this line is the preg_match() validation, so, if the HTTP_HOST value fails the validation, it would revert to localhost. |
Welcome Guest, Not a member yet? Register Sign In |