Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Routing Issue and Admin Interface

edited June 2014 in Modules
For routing I used the following in my route.php file
$route['(:any)'] = 'innerpage/';

But now the issue is backend admin also get routed to innerpage controller. Is there any way to prevent that. I tried using $route['fuel']='fuel/'; but with no success.


  • edited 12:47AM
    When I used the following
    $route['fuel'] = 'fuel/login';
    $route['fuel/(:any)'] = 'fuel/$1';

    I am getting the dashboard. But not able to access modules I have created.
  • edited 12:47AM
    Are you trying to route all your requests to "innerpage" except for requests the FUEL CMS? You could try using the 404_override route. FUEL uses this to automatically display pages that don't have controllers defined.
  • edited 12:47AM
    Yes. I want to route all requests other than admin to innerpage. innerpage is also a controller so 404_override is not working.
  • edited 12:47AM
    Anyway I am individually specifying now the pages for routing instead of $route['(:any)']='innerpage/'. But the issue is that each time I add a new category I have to modify the route.php file. I tried populating these pages from database but it is giving a connection error in routing.php. How can I access database from routing.php?
  • edited 12:47AM
    The routing process happens before any database can be loaded (it happens when determining which controller to use). So this doesn't work?
    $route['404_override'] = 'innerpage';
    You may need to use the "_remap" method in that controller to route requests to the proper method if you aren't already.
  • edited 12:47AM
    I have routing.php as follows
    $route['default_controller'] = 'articles'; $route['404_override'] = 'innerpage';
    I get the following error:

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined offset: 1

    Filename: fuel/Router.php

    Line Number: 93
    An Error Was Encountered

    Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.
  • edited 12:47AM
    I've posted a fix for that in the develop branch if you want to pull from there.
  • edited 12:47AM
    Please let me know which files you have made changes so that I can just download those files.
Sign In or Register to comment.