Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
The below routing works but now I cannot access my Admin module
  • Cannot access my Admin module not, see the topic below this one for the action_index

    Module Admin is namespaces Admin;

    I cannot get to the module using the routing provided by the below topic.

  • If you're using a catch-all route like that, the only way to make this work is to create routes for all other one-segment URI's.

    You could hack your way around by using the 404 route. Don't define the route in the other post, so /admin maps to an existing controller and works, and /about doesn't. so it throws a 404.

    Then, in your 404 action, do an HMVC call for your slug (i.e. do the lookup on 'about'), and if found show that page, and if not,set the 404 header and return an error.
  • Is there a way to setup the other catch all to use the Uri::segment instead?

    Where i can check for the segment and decide by that.
    I would prefer to use segments to check for a page.

  • HarroHarro
    Accepted Answer
    The problem is that there is no automatic way do create a single route that maps /about to a page controller, and /admin to something else, without either one of the solutions I mentioned.

    You should be able to access URI's like /admin/users/create, or doesn't that work either?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion