部署Codeigniter时出现500内部服务器错误

部署Codeigniter时出现500内部服务器错误,codeigniter,web-deployment,Codeigniter,Web Deployment,我试图部署我的网站,但我不断得到500个内部服务器错误。我可以很好地打开主页,但当我想打开另一个菜单选项卡时,它总是显示500个内部服务器错误。我也检查了日志,但似乎没有找到任何线索。以下是我的服务器错误日志显示的内容: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> DEBUG - 2013-03-20 11:36:44 --> Config Class Initi

我试图部署我的网站,但我不断得到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

调试-2013-03-20 11:36:44-->配置类已初始化
调试-2013-03-20 11:36:44-->钩子类已初始化
调试-2013-03-20 11:36:44-->Utf8类已初始化
调试-2013-03-20 11:36:44-->已启用UTF-8支持
调试-2013-03-20 11:36:44-->URI类已初始化
调试-2013-03-20 11:36:44-->路由器类已初始化
调试-2013-03-20 11:36:44-->不存在URI。默认控制器设置。
调试-2013-03-20 11:36:44-->输出类已初始化
调试-2013-03-20 11:36:44-->安全类已初始化
调试-2013-03-20 11:36:44-->输入类已初始化
调试-2013-03-20 11:36:44-->已清除全局POST和COOKIE数据
调试-2013-03-20 11:36:44-->语言类已初始化
调试-2013-03-20 11:36:44-->加载程序类已初始化
调试-2013-03-20 11:36:44-->已加载配置文件:application/Config/asset.php
调试-2013-03-20 11:36:44-->已加载帮助程序:资源\u帮助程序
调试-2013-03-20 11:36:44-->已加载帮助程序:字符串\u帮助程序
调试-2013-03-20 11:36:44-->已加载帮助程序:url\U帮助程序
调试-2013-03-20 11:36:44-->已加载帮助程序:窗体\u帮助程序
调试-2013-03-20 11:36:44-->已加载帮助程序:文本\u帮助程序
调试-2013-03-20 11:36:44-->数据库驱动程序类已初始化
调试-2013-03-20 11:36:44-->本机会话类已初始化
调试-2013-03-20 11:36:44-->表单验证类已初始化
调试-2013-03-20 11:36:44-->控制器类已初始化
调试-2013-03-20 11:36:44-->模型类已初始化
调试-2013-03-20 11:36:44-->模型类已初始化
调试-2013-03-20 11:36:44-->加载的文件:application/views/view_home.php
调试-2013-03-20 11:36:44-->加载的文件:application/views/template.php
调试-2013-03-20 11:36:44-->最终输出发送到浏览器
调试-2013-03-20 11:36:44-->总执行时间:0.0295
这是我的名片

重新启动发动机 重写数据库/印支网站/

#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>
#删除用户对系统文件夹的访问权限。
#此外,这将允许您创建System.php控制器,
#以前这是不可能的。
#如果已重命名系统文件夹,则可以替换“系统”。
重写COND%{REQUEST_URI}^系统*
重写规则^(.*)$/indocreweb/index.php?/$1[L]
#当应用程序文件夹不在系统文件夹中时
#此代码段阻止用户访问应用程序文件夹
#提交人:Fabdrol
#将“应用程序”重命名为应用程序文件夹名称。
重写cond%{REQUEST_URI}^应用程序*
重写规则^(.*)$/indocreweb/index.php?/$1[L]
#检查用户是否试图访问有效文件,
#例如图像或css文档,如果这不是真的,它会发送
#请求index.php
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$/indocreweb/index.php?/$1[L]
#如果我们没有安装mod_rewrite,所有404 #可以发送到index.php,一切正常。 #提交人:ElliotHaughin ErrorDocument 404/index.php

从日志显示的情况来看,我找不到任何问题的线索,也找不到导致问题的原因。有人知道这件事吗-(


谢谢。

从错误中可以看出,发生这种情况的主要原因是.htaccess 通常每个服务器都有mod_rewrite,所以我不认为模块的存在是一个问题

我认为您需要在RewriteBase/indocreweb上使用第一行:RewriteEngine/ 尝试删除斜杠,甚至检查url是否正确 例如,如果您直接访问该站点,那么它应该是 在重写基础上重写引擎/ 比如www.indocreweb.com

但是如果它被作为子文件夹或类似www.indocreweb.com/indocreweb的东西访问 然后 RewriteBase/indocreweb上的RewriteEngine


希望这有帮助。

您的.htaccess文件中似乎有问题。您可以共享站点地址,以便我查看吗?检查您的错误日志。它将包含有关500.check htaccess的详细信息,并确保您的重写模块已启用。@raheelshan我添加了上面显示的htaccess。请查看一下。您能告诉我是什么原因吗问题是什么?谢谢