php

Thinkphp .htaccess文件设置伪静态

2023-09-23

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