I've installed Resource Router and set up a few basic routes, but they don't seem to be working. No routes will work at all, is there something else I need to do to "activate" the plugin?

Edit to add code:

We're using the Focus Labs multi environment config, so in my config.php I've got:

require $_SERVER['DOCUMENT_ROOT'] . '/config/config.master.php';

I've then called Resource Router in config.master.php with:

// Resource Router
 $env_config['resource_router'] = require 'routes.php';

And in my routes.php, I've set up a simple route:

return [ 
'careers/:any' => 'careers/article',

I am getting as far as the routes.php file as I can echo something out from it, but just can't get the routes to work.

  • If it's showing "installed" in add-ons that should be it. Post your resource router code? Jul 12, 2017 at 14:54
  • Hi, thanks for your help, I've updated the comment above with code.
    – Mark
    Jul 12, 2017 at 16:17
  • 1
    Have you tried moving rr code to config.php in system folder and bypassing master config for testing? $config['resource_router'] = array( 'careers/:any' => 'careers/article', ); Jul 12, 2017 at 18:40
  • Hi, I did try that before I posted the questions, but it didn't work at the time. I just tried it again, and it's decided to work this time. I guess we'll just have to leave the master config set up out for now. Thanks for your help.
    – Mark
    Jul 13, 2017 at 13:37

1 Answer 1


Not sure why the master config set up isn't working, but taking it out and moving the routers to the standard config file is working correctly

  • Glad you have it working. One other thought: if your php version is less than 5.4 your example 'short' syntax [] wouldn't work, and you'd need to use array(). Not sure if that applies to your install though... php.net/manual/en/language.types.array.php Jul 13, 2017 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.