Use Case

You have a view that lists articles but you want to disable access to single articles in node/[nid].


drush -y en rabbit_hole

How To Use It

Go to admin/modules and enable the entity types you want to restrict access to:

Go to admin/structure/types/manage/article and you can find the Rabbit Hole settings at the bottom.

Select Access denied as the behavior:

Now you can see the articles listed in the front page:

But if you click them, you get access denied:


Go to /admin/structure/types/manage/article

You can also choose Page not found behavior or make a Page redirect:

Note: install Token module to see the token widget in the image.

In this case you would be redirected to the login page whenever you try to access an article in node/[nid].

Overrides And Permissions

You can allow these settings to be overridden for single entities in /admin/structure/types/manage/article:

Edit any article and you have the option to change the behavior for that single entity:

You can also allow certain roles to bypass Rabbit Hole in /admin/people/permissions:

Rabbit Hole Project Page