1
我要上傳我的本地Laravel項目上GoDaddy的,但我有一些錯誤如何設置的.htaccess爲一個共享的主機GoDaddy的服務器
錯誤
[Wed Jul 05 21:16:44.858396 2017]
[autoindex:error] [pid 21796:tid 139689709188864]
[client 99.240.235.234:57754]
AH01276:
Cannot serve directory /home/bugsbunny/public_html/sto.com/:
No matching DirectoryIndex (/home/bugsbunny/public_html/sto.com/public/index.php)
found, and server-generated directory index forbidden by Options directive
的.htaccess
上一個子域DirectoryIndex /home/bugsbunny/public_html/sto.com/public/index.php
<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^/home/bugsbunny/public_html/sto.com/public/index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
步驟,我沒有
- 我的編輯我的意思是改變在第一行的目錄,並通過
RewriteRule
- 開始行我切&這個文件粘貼到根目錄
- 我上傳的項目進入編輯的公共/ .htaccess文件
- godaddy