tp6省略url里的index.php

apache环境下,修改public下的.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>

 

posted @ 2020-09-02 21:11  陈莺莺呀  阅读(1331)  评论(0编辑  收藏  举报