[ Apache ]
httpd.conf
配置文件中加载了mod_rewrite.so
模块AllowOverride None
将None
改为All
- 把下面的内容保存为
.htaccess
文件放到应用入口文件的同级目录下
<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] </IfModule>