Is it possible to establish a catchall controller method? |
I'm moving a site over to CodeIgniter. It currently serves a LOT of urls which we have painstakingly tweaked for SEO. I definitely plan to try and organize my site's code by creating appropriate controllers. For example, http://example.com/help would route to a controller class named Help in the file help.php in the controllers folder.
I'm wondering, however, if it's possible to set up a controller that gets called when none of my existing controllers match. I.e., a 'catchall' or 'fallback' controller. Is this possible? I tried creating a _remap function on my default controller but it doesn't seem to catch this type of thing: http://example.com/this-is-not-a-controller-name I'm really hoping I don't have to specify every arbitrary possibility by defining some controller for it or making an entry in the routes.php file. |
Welcome Guest, Not a member yet? Register Sign In |