1.httpd.conf中去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#號
2.AllowOverride None 修改為了AllowOverride All
3.在config文件中添加以下配置:
// URL地址不區(qū)分大小寫
'URL_CASE_INSENSITIVE'? =>? true,
//REWRITE模式
'URL_MODEL' => 2,
4.根目錄.htaccess如果沒有自己建也可以。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteBase /index.php
RewriteRule ^(.*)$ /index.php?/$1 [L]