thinkphp5与thinkphp6伪静态的两种方式
thinkphp5方式:
<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>
thinkphp6的方式:
<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>
按理来说两种方式都是可以的,但有时候静态的网页会出现问题,建议根据自己的开发遇到的问题来选择。