Question: Is there a way for users to create routes in the admin?

Issue: I have a bunch of nodes and tax terms that are being used in Views but no where else. They shouldn't be accessible to the public either. Changing their path to /admin didn't give me the result I wanted, where in D7, that would automatically set them to the admin theme and I could set the permissions that way. I haven't found a decent entity module to create them like I want either.

Solution: Created a module that used a wildcard route. Then create a service that uses RouteSubscriberBase and alterRoutes to block any access to it without X permission.

I think there is some potential for others to use this but cannot find a way to set the routes to be blocked through the admin. x

1 Answer 1


You may want to check out the Rabbit Hole module.

Rabbit Hole is a module that adds the ability to control what should happen when an entity is being viewed at its own page.

Perhaps you have a content type that never should be displayed on its own page, like an image content type that's displayed in a carousel. Rabbit Hole can prevent this node from being accessible on its own page, through node/xxx.

  • Exactly what I needed. Thanks. Wish I had asked before going through the trouble of making my own module.
    – CJdriver
    Apr 5, 2018 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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