簡體   English   中英

Codeigniter:500:內部錯誤

[英]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/

這是網站http://speedgaragedoor.com/speedgaragedoor/

您應該在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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM