2013-03-20 115 views
0

我想部署我的網站,但我一直收到500內部服務器錯誤。我可以打開主頁,但是當我想打開另一個菜單選項卡時,它會一直顯示500內部服務器錯誤。我也檢查了日誌,但似乎沒有發現任何線索。下面是我的錯誤日誌中顯示:500部署Codeigniter中的內部服務器錯誤

<?php if (! defined('BASEPATH')) exit('No direct script access allowed'); ?> 

DEBUG - 2013-03-20 11:36:44 --> Config Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Hooks Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Utf8 Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> UTF-8 Support Enabled 
DEBUG - 2013-03-20 11:36:44 --> URI Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Router Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> No URI present. Default controller set. 
DEBUG - 2013-03-20 11:36:44 --> Output Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Security Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Input Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Global POST and COOKIE data sanitized 
DEBUG - 2013-03-20 11:36:44 --> Language Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Loader Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Config file loaded: application/config/asset.php 
DEBUG - 2013-03-20 11:36:44 --> Helper loaded: asset_helper 
DEBUG - 2013-03-20 11:36:44 --> Helper loaded: string_helper 
DEBUG - 2013-03-20 11:36:44 --> Helper loaded: url_helper 
DEBUG - 2013-03-20 11:36:44 --> Helper loaded: form_helper 
DEBUG - 2013-03-20 11:36:44 --> Helper loaded: text_helper 
DEBUG - 2013-03-20 11:36:44 --> Database Driver Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Native_session Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Form Validation Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Controller Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Model Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> Model Class Initialized 
DEBUG - 2013-03-20 11:36:44 --> File loaded: application/views/view_home.php 
DEBUG - 2013-03-20 11:36:44 --> File loaded: application/views/template.php 
DEBUG - 2013-03-20 11:36:44 --> Final output sent to browser 
DEBUG - 2013-03-20 11:36:44 --> Total execution time: 0.0295 

我的繼承人.httaccess

RewriteEngine敘述在 RewriteBase/indocreweb /#如果我們沒有安裝

#Removes access to the system folder by users. 
#Additionally this will allow you to create a System.php controller, 
#previously this would not have been possible. 
#'system' can be replaced if you have renamed your system folder. 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ /indocreweb/index.php?/$1 [L] 

#When your application folder isn't in the system folder 
#This snippet prevents user access to the application folder 
#Submitted by: Fabdrol 
#Rename 'application' to your applications folder name. 
RewriteCond %{REQUEST_URI} ^application.* 
RewriteRule ^(.*)$ /indocreweb/index.php?/$1 [L] 

#Checks to see if the user is attempting to access a valid file, 
#such as an image or css document, if this isn't true it sends the 
#request to index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /indocreweb/index.php?/$1 [L] </IfModule> 

的mod_rewrite ,所有的404的 #可以發送到index.php,並且一切正常。 通過#Submitted:ElliotHaughin 的ErrorDocument 404的index.php

從什麼記錄顯示,我找不到任何線索是什麼導致它的問題還是什麼。任何人都有這個想法? :-(

謝謝。

+0

似乎有問題在你的.htaccess文件中 – 2013-03-20 06:35:55

+0

可以分享網站地址,這樣我可以看看它嗎? – 2013-03-20 06:36:40

+0

檢查您的錯誤日誌。它會詳細介紹500. – 2013-03-20 06:38:30

回答

0

從它看起來大多是因爲的.htaccess 的發生的錯誤通常每個服務器有mod_rewrite的,所以我不認爲模塊的存在是一個問題。

我認爲你需要玩的第一行中:RewriteEngine On RewriteBase/indocreweb/ 嘗試刪除斜線,或檢查URL甚至是否正確 例如,如果你直接訪問該網站,那麼它應該是 RewriteEngine敘述在RewriteBase/ 像www.indocreweb.com

但是,如果它被作爲一個子文件夾或類似www.indocreweb.com/indocreweb 然後 RewriteEngine敘述在RewriteBase/indocreweb

希望這有助於一些訪問。