CodeIgniter Forums
Redirect Errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Redirect Errors (/showthread.php?tid=57249)



Redirect Errors - El Forum - 02-28-2013

[eluser]Unknown[/eluser]
Hi Community,

Is it possible to write a class/function/whatever to fetch all php errors, that occur on my site, and email/log them (i want to write code to define what happens with them) and redirect the users to a defined site?


Thank you

Bernd


Redirect Errors - El Forum - 02-28-2013

[eluser]Ochetski[/eluser]
You can override 404 errors with routes:

$route['404_override'] = 'class/method';

To change other erros you can try using an MY_Exceptions.php file to make errors work as you wish.