2013-12-09 82 views
-1

UPDATE:通過將子目錄移回到根目錄中,我發現它根本不是一個重定向問題,因爲500內部服務器錯誤仍在繼續。 我的錯誤日誌顯示如何將Godaddy託管的域名重定向到子目錄?

[fcgid:warn] [client 5.10.83.81:49983] mod_fcgid: read data timeout in 120 seconds 
    [Sun Dec 08 21:44:13 2013] [10144377] [core:error] [client 5.10.83.81:49983] End of script output before headers: index.php 
    [Sun Dec 08 21:44:15 2013] [10144377] [fcgid:warn] [client 5.10.83.45:43337] mod_fcgid: read data timeout in 120 seconds 
    [Sun Dec 08 21:44:15 2013] [10144377] [core:error] [client 5.10.83.45:43337] End of script output before headers: index.php 

原題: 我不斷收到500內部服務器錯誤試圖重定向到votebird.com votebird.com/launch
我已經嘗試了一些的.htaccess代碼,但不能當足夠了。 我也嘗試Godaddy的URL重定向,但沒有運氣。

當前的.htaccess是

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^(www.)?votebird.com$ 
RewriteCond %{REQUEST_URI} !^/launch/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /launch/$1 
RewriteCond %{HTTP_HOST} ^(www.)?votebird.com$ 
RewriteRule ^(/)?$ launch/index.php [L] 

子目錄(/啓動)也有它的.htaccess有很多的在它的代碼,從here

回答

0

問題是其實並不是一個重定向問題。 有上面列出的電話,我通過刪除我正在託管但不再使用(有工作重定向)的網站解決它們。林不知道爲什麼,但在這個網站上的東西似乎導致腳本超時。

當我這樣做後,我的錯誤日誌顯示了更多的原始500錯誤被引發的信息。 我能夠追溯到這個: https://github.com/h5bp/html5-boilerplate/issues/1012 所以,問題是,代碼給出的.htaccess文件here需要一些更新的Apache代碼,以顯示在上面的鏈接。

<IfModule mod_filter.c>             
    <IfModule mod_deflate.c> 
     AddOutputFilterByType DEFLATE application/atom+xml \ 
             application/javascript \ 
             application/json \ 
             application/rss+xml \ 
             application/vnd.ms-fontobject \ 
             application/x-font-ttf \ 
             application/xhtml+xml \ 
             application/xml \ 
             font/opentype \ 
             image/svg+xml \ 
             image/x-icon \ 
             text/css \ 
             text/html \ 
             text/plain \ 
             text/x-component \ 
             text/xml 
    </IfModule> 
</IfModule> 

一旦修復了這個問題,我可以在控制面板中簡單地創建正確的重定向。