今天使用thinkphp5的时候,网页返回No input file specified.
很是奇怪,之前还好好的。
比如url:http://localhost/public/ 可以正常访问
url改为:http://localhost/public/index 就返回No input file specified.
解决方案:
打开项目的根目录的public目录下的.htaccess文件
修改为:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] </IfModule>
保存,重启apache,一切搞定。