CodeIgniter应用程序在移动到生产时显示404 [英] CodeIgniter app shows 404 when moved to production

查看:64
本文介绍了CodeIgniter应用程序在移动到生产时显示404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的本地计算机上使用CodeIgniter开发了一个应用程序,并且昨天将其移动到生产服务器(活动网站)。



我的问题是,我加载网站,它立即显示我一个页面未找到错误(404)。我100%肯定这与服务器本身无关,因为一个干净的CodeIgniter安装工作完美。



我更改了config.php中的设置和database.php来反映新的环境,所以它应该工作。日志文件没有显示任何有用的东西(只是它在加载URI库后找不到index_php)。



任何想法如何解决这个问题? p>

您的帮助非常感谢。

解决方案

刚才发现了问题。我的默认控制器的文件名以大写字母开头。我把它改为小(例如:'example.php'而不是'Example.php'),它工作。



我浪费了这么多时间在这样一个愚蠢的错误。 :(


I've finished developing an app using CodeIgniter in my local machine, and moved it to the production server (live site) yesterday.

My problem is that when I load the site, it immediately shows me a "page not found" error (404). I'm 100% sure this has nothing to do with the server itself, since a clean CodeIgniter installation works perfectly fine.

I've changed the settings in config.php and database.php to reflect the new environment so it's supposed to work. The log file isn't showing anything helpful (only that it can't find index_php after loading the URI library).

Any idea how I can troubleshoot this?

Your help is so much appreciated.

解决方案

Just found the issue. My default controller's file name started with a capital letter. I changed it to small (e.g.: 'example.php' instead of 'Example.php') and it worked.

I've wasted so much time on such a silly error. :(

这篇关于CodeIgniter应用程序在移动到生产时显示404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆