如何正确修复laravel 5.5的.htaccess?

问题描述 投票:0回答:1

我正在尝试将laravel项目部署到服务器中。我收到这个常见错误

当前无法处理此请求。HTTP错误500

我在dd那里呆了4个小时! route / web.php中的dd正在工作!在public_html> index.php无法正常工作]

    $response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

[我以为.htaccess不好,我不知道了.htaccess:

<IfModule mod_rewrite.c>
<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]

有人可以帮我吗?谢谢

php .htaccess laravel-5 deployment cpanel
1个回答
0
投票

将Laravel根文件夹中的server.php重命名为index.php

将.htaccess文件从/ public目录复制到您的Laravel根文件夹。

© www.soinside.com 2019 - 2024. All rights reserved.