我正在尝试部署我的网站,但我不断收到500内部服务器错误。我可以很好地打开主页,但是当我想打开另一个菜单选项卡时,它会一直显示500内部服务器错误。我也检查了日志,但似乎没有发现任何线索。这是我的服务器错误日志显示的内容:
<?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 On 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,一切正常。 #提交人:ElliotHaughin ErrorDocument 404 /index.php
从日志显示,我找不到任何线索是什么问题或是什么导致它。有人对此有所了解吗? : - (
谢谢。
答案 0 :(得分:0)
从错误中看起来大多数情况都是因为.htaccess而发生的 通常每个服务器都有mod_rewrite,所以我不认为模块存在是一个问题。
我认为你需要玩第一行:RewriteEngine On RewriteBase / indocreweb / 尝试删除斜杠,或检查网址是否正确 例如,如果您直接访问该网站,那么它应该是 RewriteBase上的RewriteEngine / 比如www.indocreweb.com
但是,如果它被作为子文件夹或类似www.indocreweb.com/indocreweb访问 然后 RewriteEngine On RewriteBase / indocreweb
希望这有帮助。