【发布时间】:2017-09-01 06:49:38
【问题描述】:
我正在使用 codeigniter 在 heroku 上部署一个简单的站点。它在 localhost (xampp) 上工作得很好,但在 heroku 上却不行。在 heroku 上它需要 index.php 并说无法加载模型“核心”并且它也区分大小写。我该怎么办?
当我跑步时
我的页面加载但当我运行时
它说
404 Page Not Found
The page you requested was not found.
但它适用于
我的默认控制器是welcome
我已将其包含在我的.htaccess中
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
在我的 config.php 中
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
【问题讨论】:
标签: php .htaccess codeigniter heroku