Thinkphp3.2.3 No input file specified 的解決方法

由於在Fastcgi模式下,php不支持rewrite的目標網址的PATH_INFO的解析ThinkPHP運行在URL_MODEL=2時,會出現 No input file specified.的狀況,這時能夠修改網站目錄的.htaccess文件:php

原代碼爲:網站

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

「No input file specified.」,是沒有獲得有效的文件路徑形成的。ci

修改僞靜態規則,以下:input

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
相關文章
相關標籤/搜索