只需要在目录下新建立一个配置文件 (.htaccess) 在里面写如 RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] 就可以去掉index.php了