【问题标题】:Page isn't working and returns HTTP error 500 in CodeIgniter页面不工作并在 CodeIgniter 中返回 HTTP 错误 500
【发布时间】:2017-02-25 12:54:08
【问题描述】:

我有一个在 CodeIgniter 中构建的站点,在我的本地主机上运行良好,但是在将站点迁移到子域上的在线服务器时,它给出“页面不工作,http://sub.domain.com 无法处理请求。HTTP 错误500"

我还将base_urllocalhost/school/ 更改为sub.domain.com,并且 数据库凭据也很好。

这是我的 htaccess 代码:

【问题讨论】:

  • 检查您网站的日志文件是否有错误消息。

标签: php .htaccess codeigniter


【解决方案1】:
RewriteEngine on

RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com

RewriteRule ^(.*)$ http://domain.com/subdomains/%1/$1 [L,NC,QSA]

【讨论】:

  • 为什么有 2 个答案??
猜你喜欢
  • 1970-01-01
  • 2011-07-21
  • 1970-01-01
  • 2021-11-22
  • 1970-01-01
  • 2011-07-05
  • 1970-01-01
  • 1970-01-01
  • 2018-01-04
相关资源
最近更新 更多