thinkphp5 设置.htaccess报input file specified的解决方法

先去检查服务器设置,这个网上方法很多就不说了,如果服务器没问题还是报这个错误的话可能和php版本有关

php5.4和以下版本的.htaccess

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

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

php5.5及以上版本的.htaccess

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

猜你喜欢

转载自www.cnblogs.com/njflash/p/10305249.html
今日推荐