【发布时间】:2021-11-18 04:04:36
【问题描述】:
我的 Laravel 应用程序已在我的 Cpanel 上运行了 3 年多。
今天当你访问我的网站时它开始抛出错误No input file specified.。
我将相同的代码移动到子域 text.lamxxx.com 并且它工作正常。
但在我的主域上仍然抛出No input file specified.
我已经排除故障超过 24 小时。我检查了服务器日志,检查 laravel 日志等。但网站仍然关闭。
下面是我的 .htacces
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit```
【问题讨论】:
-
我使用 index.html 并且网站打开了它....但是当我尝试打开 .php 脚本时它显示错误。
标签: php laravel .htaccess laravel-5 cpanel