.htaccess文件修改
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|themes|uploads|uploads_thumb|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
config/config.php中:
$config['uri_protocol'] = "AUTO"; //或者是PATH_INFO