Welcome Guest, Not a member yet? Register   Sign In
Why do you need to manually set base_url in config ?
#1

[eluser]bernstable[/eluser]
Been puzzling over this and I must confess to not being able to understand why you need to manually set base_url in the config file. Surely the following ensures that the base url is set correctly whether viewing locally, remotely or if you have moved your application to a brand new and shiny url Wink

$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'];

And with my limited knowledge I'd have thought that the above would be the most logical default setting in the CI files as it catches all.

Am I totally missing the point? Can anyone tell me why I shouldn't be doing that? (Go easy on me I've only just started with CI Smile but I'm loving it)


Messages In This Thread
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 04:43 AM
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 05:01 AM
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 05:05 AM
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 05:09 AM
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 05:11 AM
Why do you need to manually set base_url in config ? - by El Forum - 02-03-2009, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB