From d42b9c32fa22497311c9197d5f6c16683e6fbf6f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 21 Aug 2013 14:15:21 +0000 Subject: [PATCH] --- .htaccess | 8 +++-- framework/application/Bootstrap.php | 4 +-- framework/application/configs/application.ini | 29 ++++--------------- index.php | 8 ++--- 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/.htaccess b/.htaccess index 8f956f7..13bf750 100644 --- a/.htaccess +++ b/.htaccess @@ -24,8 +24,10 @@ RewriteEngine on RewriteBase / # Redirection to www. subdomain - RewriteCond %{HTTP_HOST} ^example.com$ - RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] + RewriteCond %{HTTP_HOST} !^www.ccgm.fr$ + RewriteRule ^(.*)$ http://www.ccgm.fr/$1 [R=301,L] + # Redirect auth header to env + RewriteRule ^.*$ - [E=REMOTE_USER:%{HTTP:Authorization}] # Skip static files RewriteRule ^css/ - [NC,L] RewriteRule ^js/ - [NC,L] @@ -39,7 +41,7 @@ RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] # Finally, redirect all other cases to the index.php - RewriteRule ^.*$ index.php [NC,L] + RewriteRule ^.*$ [NC,L] diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index ab77aa0..a083b16 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -14,8 +14,8 @@ class Bootstrap extends CubeIT_Bootstrap { $this->getView()->headScript()->addWebFont(array('google' => array('families' => array('Ubuntu:500italic,300,300italic,500,400italic')))); } - protected function _initRouter($initCms = true) { - $router = parent::_initRouter($initCms); + protected function _initRouter($initCms = true, $standard = true) { + $router = parent::_initRouter($initCms, $standard); return $router; } diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index b58b39d..aa337ad 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -25,8 +25,6 @@ includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "CCGM" -resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" -resources.frontController.params.displayExceptions = 0 resources.view[] = resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" @@ -36,21 +34,13 @@ timezone = 'Europe/Paris' session.lifetime = 31536000 ;1 year session.adapter = cache -webhost = www. +webhost = www.ccgm.fr database.adapter = pdo_mysql -database.params.host = -database.params.username = -database.params.password = -database.params.dbname = - -;former.database.adapter = pdo_mysql -;former.database.params.host = -;former.database.params.username = -;former.database.params.password = -;former.database.params.dbname = - -;former.home = +database.params.host = mysql51-56.pro +database.params.username = ccgmzwgfweb +database.params.password = 6vr7TbBC +database.params.dbname = ccgmzwgfweb seo.universalAnalytics = UA-42799235-1 seo.google = @@ -84,11 +74,4 @@ resources.frontController.params.displayExceptions = 1 httpauth.username = ccgm httpauth.password = 20ccgm13 -seo.robots = false - -database.params.host = localhost -database.params.username = ccgm -database.params.password = k8impxgKCK -database.params.dbname = ccgm - -webhost = ccgm.cubedesigners.com \ No newline at end of file +seo.robots = false \ No newline at end of file diff --git a/index.php b/index.php index 3eaff12..fd19d45 100644 --- a/index.php +++ b/index.php @@ -4,10 +4,6 @@ $start = microtime(true); ini_set('log_errors', '1'); ini_set('error_log', dirname(__FILE__) . '/log/php_error.log'); -if ($_SERVER['HTTP_HOST'] == 'ccgm.cubedesigners.com') { - define('APPLICATION_ENV', 'testing'); -} else if ($_SERVER['HTTP_HOST'] == 'www.') { - define('APPLICATION_ENV', 'production'); -} +define('APPLICATION_ENV', 'testing'); -include dirname(__FILE__) . '/CubeIT/common.php'; +include dirname(__FILE__) . '/CubeIT/common.php'; \ No newline at end of file -- 2.39.5