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

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

(05-13-2015, 12:44 AM)rtorralba Wrote:
(05-12-2015, 10:42 AM)CroNiX Wrote:
(05-08-2015, 01:53 AM)rtorralba Wrote: can be a problem because we must to define a base_url per environment.


You can create config files based on the environment, so each one would have its own base_url.

I know it, but it works on codeigniter 2 without definer base_url for two enviroments and, repeat entire config file just to this line? I can use enviromnet variable too, but I think is too much usually to have diferent domains for develop and production, then, in ci 3 almost all times we must duplicate this file.

I think whould be more practical that if you don't define base_url it mantains the current, that would work at all environments.



I viewed that in ci3 has ENVIRONMENT constant defined in index file, in ci 2 I also defined, then, although I think is better maintain current domain, but it can be done the following:

$config['base_url'] = ENVIRONMENT == 'development' ? 'domain.dev' : 'domain.com';


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

Theme © iAndrew 2016 - Forum software by © MyBB