1、打开Apache配置文件httpd.conf,找到
2、在CI的根目录下,建立.htaccess文件,文件内容如下
4、重启Apache
去掉前面的##LoadModule rewrite_module modules/mod_rewrite.so
搜索AllowOverride,将相应
Directory下的
AllowOverride设置为All
|
AllowOverride All
|
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
3、打开文件
application/config/config.php,
$config['index_page'] = "index.php";改为$config['index_page'] = "";
$config['index_page'] = "";