问题描述:apache配置网站出现问题“No input file specified.”

解决1:

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

  

如果还是不行,尝试以下方法:

解决2:

   以下文件内容清空或者全部注释

原文链接:https://jingyan.baidu.com/article/f7ff0bfccce11c2e26bb1381.html(感谢分享)

tp5.1 错误 No input file specified.

一、方法

与php版本有关 PHP版本5.6以上都会出现这个问题 把php版本改为5.5就OK

二、方法

.htaccess文件中的

RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

在默认情况下会导致No input file specified.

修改成

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

问题解决。

没有配置路径

路径 :\public\.htaccess.php中配置

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

官方下面写法不行

URL重写

可以通过URL重写隐藏应用的入口文件index.php(也可以是其它的入口文件,但URL重写通常只能设置一个入口文件),下面是相关服务器的配置参考:
[ Apache ]

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

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

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

原文链接:https://blog.csdn.net/XinShun/article/details/90241842(感谢分享)

最新文章

  1. Nested Loops join时显示no join predicate原因分析以及解决办法
  2. UOJ34 多项式乘法
  3. shutdown命令用法
  4. URAL 1031. Railway Tickets(spfa)
  5. spring随手笔记1:constructor-arg
  6. 夺命雷公狗mongodb之----mongodb---3---比较操作符
  7. SQL中join的用法
  8. 为sublime text2 添加SASS语法高亮
  9. HIVE中查询FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Communications link failure
  10. Netty源代码学习——Included transports(变速箱)
  11. Swift语言iOS8的蓝牙Bluetooth解析
  12. JQuery 模糊匹配
  13. Viewpager实现网络图片的轮播
  14. [Linux] Extend space of root disk in Linux7
  15. 12.24daily_scrum
  16. chmod 权限 命令详细用法
  17. O(∩_∩)O~~
  18. Python标准库笔记(8) — pprint模块
  19. Zookeeper安装以及配置说明(三)
  20. iOS开发之Xcode常见错误

热门文章

  1. yolo训练数据集
  2. HDU_3949 XOR 【线性基】
  3. lms框架即将发布第一个版本了
  4. Python基础之告警定义与告警抑制
  5. Codeforces1114C. Trailing Loves (or L&#39;oeufs?)-(质因子分解)
  6. windows环境下抓密码总结
  7. JavaCV 采集摄像头和麦克风数据推送到流媒体服务器
  8. 【软件推荐】使用Cmder替换Windows自带的控制台
  9. Spring Security OAuth2 实现登录互踢
  10. 【笔记】《Redis设计与实现》chapter21 排序