thinkphp6去掉index.php
在public目录下的.htaccess文件中,添加如下配置即可。
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
本文来自博客园,作者:刘文江,转载请注明原文链接:https://www.cnblogs.com/liuwenjiang/p/18907224

浙公网安备 33010602011771号