TP框架如何去掉入口文件index.php,现在很多项目上线后都会做一些然并***的操作。
我自己用tp5.1的框架去除index.php时按着tp5.1的手册一番操作后发现并不好使,
需要按着文档做完后,改一下.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>这里的index.php后面需要加一个?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号