【发布时间】:2016-08-22 17:02:24
【问题描述】:
我在codeiginiter中创建了一个项目
这是在没有 index.php (localhost/sample) 的本地服务器上工作的 但是当我升级到在线服务器(cpanel linux)时,默认控制器只能工作,其他下一页 URL 不起作用..(https://sample/nextpage)
如果我给 index.php 意味着工作 (https://sample/index.php/nextpage)
我想删除 index.php ,请帮帮我..
我的配置文件
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'REQUEST_URI';
我的 route.php 文件
$route['default_controller'] = "pages/home";
$route['pages/profile'] = "pages/profile";
$route['creators'] = "pages/userList";
$route[$username] = "pages/userList/userview/$1";
$route['translate_uri_dashes'] = FALSE;
$route['404_override'] = '';
我的 .htaccess 文件
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
Options All -Indexes
提前致谢,
施鲁提。
【问题讨论】:
标签: .htaccess codeigniter url codeigniter-3