简体   繁体   English

Codeigniter:500:内部错误

[英]Codeigniter: 500: Internal Error

Hello I'am Using Codeigniter it works fine on my environment. 您好我在使用Codeigniter,在我的环境中可以正常工作。 but when i upload it, it says 500: Internal Error 但是当我上传它时,它说500:内部错误

This is my .htaccess 这是我的.htaccess

# Customized error messages.

ErrorDocument 404 /index.php


# Set the default handler.

DirectoryIndex index.php


# Various rewrite rules.

<IfModule mod_rewrite.c>

  RewriteEngine on

  RewriteCond %{REQUEST_FILENAME} !-f

  RewriteCond %{REQUEST_FILENAME} !-d

  RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

</IfModule>

[Thu Nov 17 21:33:56 2016] [error] [client 120.29.125.182] SoftException in Application.cpp:313: File "/home2/choco/public_html/speedgaragedoor.com/speedgaragedoor/index.php" is writeable by group, referer: http://speedgaragedoor.com/ [2016年11月17日星期四,21:33:56] [错误] [客户端120.29.125.182] Application.cpp:313中的SoftException:文件“ /home2/choco/public_html/speedgaragedoor.com/speedgaragedoor/index.php”可由以下文件写入组,引荐来源: http : //speedgaragedoor.com/

this is the website http://speedgaragedoor.com/speedgaragedoor/ 这是网站http://speedgaragedoor.com/speedgaragedoor/

you should be active mod_rewrite on apache 您应该在Apache上处于活动状态mod_rewrite

sudo a2enmod rewrite

then you should be restart apache 那么你应该重新启动Apache

sudo systemctl restart apache2

if this operation can't solve your problem you check the codeigniter config go to application->config folder and check config file replace this codes 如果此操作不能解决您的问题,请检查codeigniter config并转到application-> config文件夹并检查config文件以替换此代码

$config['base_url'] = 'http://localhost/xxx';

to

$config['base_url'] = '';

and

$config['index_page'] = 'index.php';

to

$config['index_page'] = '';

and change the .httacess file with this code 并使用此代码更改.httacess文件

RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM