获得404错误欢迎课程 - CodeIgniter

时间:2015-10-25 13:15:54

标签: php codeigniter

我下载了CodeIgniter v3。

但我收到404错误:

http://www.vitrinsaz1.ir/Mobile/Vitrinsaz/Pannel/Welcome.php

我哪里错了?

routes.php:

$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;


$route['default_controller'] = 'index';
$route['pages/(:any)']       = "page/get/$1";

$controllers = array('bank','baseController','contact','cron','faq','inbox','index','livescore',
    'msg','news','odds','page','profile','poll','rss','setting','traction','user' ,'shop' , 'product' , 'ad'  , 'comment','login','Welcome');

foreach($controllers as $controller) {
    $route[$controller] = $controller . "/index";
    $route[$controller . "/(:any)"] = $controller . "/$1";
}

config.php:

$config['base_url'] = 'http://www.vitrinsaz1.ir/Mobile/Vitrinsaz/Pannel/';

$config['index_page'] = 'index.php';

我的.htaccess

移动/ Vitrinsaz /潘内尔/ htaccess的

<IfModule mod_rewrite.c>



RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.vitrinsaz1.ir
RewriteRule ^.*$ http://www.vitrinsaz1.ir%{REQUEST_URI} [R=301,L]

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

</IfModule>

1 个答案:

答案 0 :(得分:0)

移动添加到阵列 $ controllers

$controllers = array('bank','baseController','contact','cron','faq','inbox','index','livescore',
'msg','news','odds','page','profile','poll','rss','setting','traction','user' ,'shop' , 'product' , 'ad'  , 'comment','login','Welcome','Mobile');