Skip to content

Instantly share code, notes, and snippets.

@bytefade
Created June 28, 2014 23:28
Show Gist options
  • Save bytefade/5e4af725005d3e162190 to your computer and use it in GitHub Desktop.
Save bytefade/5e4af725005d3e162190 to your computer and use it in GitHub Desktop.
<?php
$setup = 'remote'; // local or remote
switch ($setup) {
case 'local';
$config['index_page'] = "";
$config['base_url'] = "http://".$_SERVER['SERVER_NAME'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['secure_base_url'] = "https://".$_SERVER['SERVER_NAME'];
$config['secure_base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
break;
case 'remote';
$config['index_page'] = "index.php";
$config['base_url'] = "http://www.tatacentre.ca/";
$config['secure_base_url'] = "https://www.tatacentre.sslpowered.com/tatacentre.ca/";
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment