0
我已經將我的laravel項目上傳到託管。我的文件夾結構看起來像這樣在共享主機上的index.php Laravel 500內部服務器錯誤
-httpdocs
-app
-config
-resources
-database
-contents of public folder(htaccess,index.php etc.)
-storage
-vendors
我已經移動了公用文件夾的內容和子文件夾。現在當我訪問我的網站www.something.com我得到內部服務器錯誤。我試圖刪除index.php(該文件從公用文件夾移動到httpdocs),並用index.html替換。當我訪問我的網站時,我能夠看到該頁面。但是當用index.php替換時,我得到了內部服務器錯誤。
我已經改變了一下index.php文件中這樣
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
這裏是我的htaccess文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
是因爲引導文件夾的權限發生?或者背後的猜測?我堅持了這個對於過去三小時
如何這會改變事情嗎?需要一些解釋。和Windows機器上的chmod? –
你的服務器是Windows服務器嗎? –
是的,它是Windows服務器上託管012爸爸 –