CodeIgniter Forums
Did we ever figure out custom 404 pages? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Did we ever figure out custom 404 pages? (/showthread.php?tid=29862)

Pages: 1 2


Did we ever figure out custom 404 pages? - El Forum - 04-24-2010

[eluser]Madmartigan1[/eluser]
I also just realized that CI only logs the name of the requested page (for 404s) if it is behind a valid controller.

For instance:
http://example.com/valid_class/invalid_method
will log the requested page, while
http://example.com/invalid_class
will log an empty value.

It would seem that this sucks, but I have not looked into it.

EDIT: Modular separation class was the culprit!


Did we ever figure out custom 404 pages? - El Forum - 04-25-2010

[eluser]skunkbad[/eluser]
Don't forget that you always have the raw server logs, and searching them for 404 is pretty easy.


Did we ever figure out custom 404 pages? - El Forum - 05-18-2010

[eluser]Flemming[/eluser]
After trying various ways to handle 404s and still have access to CI core I think I've settled on this one:

http://ellislab.com/forums/viewthread/141640/

by DieterStruik who suggests simply using file_get_contents() inside CI's standard 404 handler

I'm interested to hear what does anyone else think about this?


Did we ever figure out custom 404 pages? - El Forum - 05-18-2010

[eluser]Madmartigan1[/eluser]
Yeah, that's what I ended up doing exactly.
The only problem I have so far is that file_get_contents() takes forever to run sometimes.

It's crazy that with all these workarounds, it's still such a pain in the ass.
Should be built-in to CI. We have a smiley library but have to hack to get a decent 404 page.