将codeigniter从1台服务器迁移到另一台服务器

时间:2018-05-03 08:20:49

标签: .htaccess codeigniter

我试图将一个服务器上的codeigniter应用程序迁移到另一个服务器,但我在godaddy上遇到HTTP 500错误,在dreamhost上遇到404错误。

我已将文件传输到根目录并上传数据库。我已经更改了配置和数据库php文件,但它仍然无法正常工作。

.htaccess文件包含以下代码:

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  #incluye el / final
  RewriteBase /

  RewriteRule ^$ index.php [L]
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
  RewriteRule ^(.*)$ index.php?/$1 [L]  
</IfModule>

<IfModule !mod_rewrite.c>
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to index.php, and everything works as normal.
  # Submitted by: ElliotHaughin

  ErrorDocument 404 /index.php
</IfModule>

我不知道htaccess是如何运作的。请帮我解决这个问题。

以下是错误的快照:

enter image description here

enter image description here

0 个答案:

没有答案