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

(This post was last modified: 05-13-2015, 08:04 AM by rtorralba.)

(05-13-2015, 07:47 AM)mwhitney Wrote: In most cases, redirect('controller/method') should still work in this manner without setting the base_url, though you should set the base_url anyway. If it doesn't work, it would imply that site_url('controller/method') is not working, either.

All of this implies that some combination of settings (base_url, enable_query_strings, url_suffix, and index_page seem to be the most likely candidates) causes site_url() to fail. Where does redirect('controller/method') attempt to send you when base_url is empty?

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).

I think that something change in ci 3 because the documentation in config file has changed, now in ci 3 say that is recomended set this value.


Messages In This Thread
RE: redirect url helper redirect to localhost - by rtorralba - 05-13-2015, 08:03 AM

Theme © iAndrew 2016 - Forum software by © MyBB