首页 > 解决方案 > Wordpress 给出“未指定输入文件”错误,但仅在主域上

问题描述

我已将相同的 Wordpress 安装上传到服务器上的两个目录:

/public_html/domain.com
/public_html/de.domain.com

您可能已经猜到了,第一个是主域 (domain.com) 的文档根,第二个是子域 (de.domain.com) 的文档根。

奇怪的是:安装在 de.domain.com 中运行良好,但在 domain.com 上我得到的只是一行文字No input file specified,没有进一步的解释。

我浏览了互联网,发现了 100 个类似的问题,但没有一个与此完全相同。不用说,那里提出的任何建议都不适合我。举几个最常见的例子:

这是 .htaccess 的价值:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

附加信息:

标签: phpwordpress

解决方案


没有指定输入文件不是wordpress的错误,而是nginx的错误。

这意味着 nginx 找不到它应该使用的文件。

检查您的服务器配置。

https://nginxlibrary.com/resolving-no-input-file-specified-error/


推荐阅读