首页 > 技术文章 > thinkPHP 出现route不起作用提示No input file specified.

bbird 2019-12-19 16:34 原文

修改.htaccess文件

原因在于使用的PHP是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误。

打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”

如下:

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

  

推荐阅读