Skip to content

Instantly share code, notes, and snippets.

@glideranderson
Created October 23, 2012 16:07
Show Gist options
  • Save glideranderson/3939706 to your computer and use it in GitHub Desktop.
Save glideranderson/3939706 to your computer and use it in GitHub Desktop.
Custom Concrete5 config file
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
$hosts = array(
'production' => 'production.com',
'staging' => 'staging.com',
'local' => 'local.dev'
);
if ($_SERVER['HTTP_HOST'] == $hosts['local']) {
define('DB_SERVER', '127.0.0.1');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'db');
} else if ($_SERVER['HTTP_HOST'] == $hosts['staging']) {
define('DB_SERVER', 'staging_server');
define('DB_USERNAME', 'staging_username');
define('DB_PASSWORD', 'staging_password');
define('DB_DATABASE', 'staging_db');
} else {
define('DB_SERVER', 'production_server');
define('DB_USERNAME', 'production_username');
define('DB_PASSWORD', 'production_password');
define('DB_DATABASE', 'production_db');
}
define('PASSWORD_SALT', '');
define("URL_REWRITING_ALL", true);
define('ENABLE_NEWSFLOW_OVERLAY', false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment