【发布时间】:2018-06-02 01:22:28
【问题描述】:
我的 linux 服务器中的 CI 项目有问题(在 windows wamp 中没有问题), 在我的项目中,除了显示 404 错误的主页(地址 http://example.com 没有任何查询字符串)之外,每条路线都可以正常工作。 这是我的配置: 访问:
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
Options -Indexes
php_flag output_buffering On
我的路由.php:
$route['default_controller'] = 'index';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['index'] = 'index/index';
$route['/'] = 'index/index'; // i have controller index.php and action index for first page that load with address example.com/index/index
我的 config.php:
$config['base_url'] = 'http://example.com';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO'; //and "REQUEST_URI" both tested.
如有任何帮助,将不胜感激。
【问题讨论】:
标签: codeigniter