1<?php 2/* 3* LimeSurvey 4* Copyright (C) 2007-2011 The LimeSurvey Project Team / Carsten Schmitz 5* All rights reserved. 6* License: GNU/GPL License v2 or later, see LICENSE.php 7* LimeSurvey is free software. This version may have been modified pursuant 8* to the GNU General Public License, and as distributed it includes or 9* is derivative of works licensed under the GNU General Public License or 10* other free or open source software licenses. 11* See COPYRIGHT.php for copyright notices and details. 12*/ 13 14$config_folder = dirname(__FILE__) . '/../application/config/'; 15$config_file = $config_folder . 'config.php'; 16if (!file_exists($config_file)) 17{ 18 $config_file = $config_folder . 'config-sample-mysql.php'; 19} 20define('BASEPATH', dirname(__FILE__) . '/..'); // To prevent direct access not allowed 21$config = require($config_file); 22 23$urlStyle = $config['components']['urlManager']['urlFormat']; 24 25// Simple redirect to still have the old /admin URL 26if ($urlStyle == 'path') { 27 header( 'Location: ../index.php/admin' ); 28} else { 29 // For IIS use get style 30 header( 'Location: ../index.php?r=admin' ); 31}