php

Thinkphp6 中.htaccess文件设置伪静态

2023-04-24

<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>

如果出现“No input file specified.”,请将


RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

改为


RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]