在public/.htaccess 中输入这段代码即可实现过滤index.php

 

1 <IfModule mod_rewrite.c>
2   Options +FollowSymlinks -Multiviews
3   RewriteEngine On
4 
5   RewriteCond %{REQUEST_FILENAME} !-d
6   RewriteCond %{REQUEST_FILENAME} !-f
7   #RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8   RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
9 </IfModule>

 

posted on 2018-07-28 19:19  Cc_Pz  阅读(573)  评论(0)    收藏  举报