Codeigniter:500:内部错误

时间:2016-11-18 03:55:26

标签: php .htaccess codeigniter

Hello I'am使用Codeigniter,它在我的环境中运行良好。但是当我上传它时,它会显示 500:内部错误

这是我的.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 11月17日21:33:56 2016] [错误] [client 120.29.125.182] Application.cpp中的SoftException:313:文件“/home2/choco/public_html/speedgaragedoor.com/speedgaragedoor/index.php”可以按组写,引用者:http://speedgaragedoor.com/

这是网站http://speedgaragedoor.com/speedgaragedoor/

1 个答案:

答案 0 :(得分:0)

你应该在apache上激活mod_rewrite

EventDispatcher

然后你应该重启apache

sudo a2enmod rewrite

如果此操作无法解决您的问题,请检查codeigniter配置 转到application-&gt; config文件夹并检查配置文件 替换此代码

sudo systemctl restart apache2

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

$config['base_url'] = '';

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

并使用此代码更改.httacess文件

$config['index_page'] = '';