01-17-2010, 04:47 AM
[eluser]Colin Williams[/eluser]
Your first two lines, Jamie, repeat what the browser already does when it encounters paths prefixed with a "/"
That last bit is pretty useful though, since it works out subfolders.
Your first two lines, Jamie, repeat what the browser already does when it encounters paths prefixed with a "/"
That last bit is pretty useful though, since it works out subfolders.
Code:
$config['base_url'] = '/'. str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);