thinkphp部署到环境后如何隐藏index.php

在根目录下找到.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>

发表评论

邮箱地址不会被公开。 必填项已用*标注