Skip to content

Instantly share code, notes, and snippets.

@ebinnion
Created May 31, 2013 14:01
Show Gist options
  • Save ebinnion/5685188 to your computer and use it in GitHub Desktop.
Save ebinnion/5685188 to your computer and use it in GitHub Desktop.
Dynamically set CodeIgniter Base URL
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";
@giri021
Copy link

giri021 commented May 17, 2019

how to configure web with Dynamically set CodeIgniter Base URL, if this apps are in ecs container with 3 web site with different ip address >> http://3.15.23.138:86/ & http://3.15.23.138:87/ & http://3.15.23.138:88/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment