打开 httpd.conf
搜索 mod_rewrite.so
把前面的#删掉
将 AllowOverride none
设置为 AllowOverride 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>
重启
Apache
版本
thinkphp5.1
Apache 2.4.39