Welcome Guest, Not a member yet? Register   Sign In
Base URL Question
#2

[eluser]ejangi[/eluser]
Well... you're probably not taking into account that some people (highly unlikely, but possible none the less) might run the site securely (i.e. https://) and/or from a certain port (i.e. http://www.mysite.com:2082/), so maybe you could do:

Code:
$config['base_url'] = ((!$_SERVER['HTTPS'] || $_SERVER['HTTPS'] == 'off') ? 'http' : 'https').'://'.$_SERVER['HTTP_HOST'].(($_SERVER['REMOTE_PORT']) ? ':'.$_SERVER['REMOTE_PORT'] : '').'/';

Now, that's what I call inelegant! Tongue


Messages In This Thread
Base URL Question - by El Forum - 12-20-2007, 10:30 PM
Base URL Question - by El Forum - 12-20-2007, 11:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB