Welcome Guest, Not a member yet? Register   Sign In
using error_404.php to handle 301 redirect
#3

[eluser]WanWizard[/eluser]
Have you tried it?

error_404 is called from the router library if the requested controller can not be found. This is way before the $CI object is created, so no access to a database. You could store them into an array, and then redirect based on an in_array() kind of test.

Alternatively you could upgrade to CI 2.0, which has a '404_override' controller in config/routes.php, which does have full access (like any other controller).


Messages In This Thread
using error_404.php to handle 301 redirect - by El Forum - 08-18-2010, 11:52 PM
using error_404.php to handle 301 redirect - by El Forum - 08-23-2010, 10:47 AM
using error_404.php to handle 301 redirect - by El Forum - 08-23-2010, 11:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB