I have a module with a route that looks like this:


Is it possible to set up a custom route within my module so I can send people to:


I'm new to Craft 3, but so far loving it.


1 Answer 1


Yep, you can add the route in config/routes.php.

return [
    'custom/route' => 'module/controller/action',

(See https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules)

  • That didn't seem to work for me. But it looks like it totally should work. I think it might be something screwy with my local development environment, so I'll keep playing around with it. Thanks for the quick answer! I'll mark it as accepted once I get my env issues figured out! Aug 13, 2018 at 16:47

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.