.htaccess配置文件内部全体换成下面代码
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
并且在最外层目录下复制一份
在controller外面加上
function __construct()
{
parent::__construct();
$this->load->helper('url');
}