隐藏index.php需要两个文件三个地方进行修改。
文件一:apache中的
1、httpd.conf
配置文件中加载了mod_rewrite.so
模块
2、AllowOverride None
将None
改为 All
文件二,.htaccess
在文件根目录下的.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>