thinkphp5.0.9 出现的错误是:No input file specified

浏览:7254 发布日期:2017/06/15 分类:技术分享 关键字: No input file specified index.php
之前的写的代码 复制到另外一台服务器提示No input file specified 必须要加index.php才行 就想去掉index.php

thinkphp5.0.9 出现的错误是:No input file specified

解决方法

httpd.conf配置文件中加载了mod_rewrite.so模块
AllowOverride None 将None改为 All
把下面的内容保存为.htaccess文件放到应用入口文件的同级public文件目录下

代码如下:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>

完成


修改之前:http://你的域名/index.php/home
修改之后:http://你的域名/home


最佳答案
评论( 相关
后面还有条评论,点击查看>>