[英]Codeigniter: 500: Internal Error
您好我在使用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>
[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/
您应该在Apache上处于活动状态mod_rewrite
sudo a2enmod rewrite
那么你应该重新启动Apache
sudo systemctl restart apache2
如果此操作不能解决您的问题,请检查codeigniter config并转到application-> config文件夹并检查config文件以替换此代码
$config['base_url'] = 'http://localhost/xxx';
至
$config['base_url'] = '';
和
$config['index_page'] = 'index.php';
至
$config['index_page'] = '';
并使用此代码更改.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.