0

I find going to /node as being very useful to pinpoint exactly what content non-authorized users can see. But for two reasons I don't want anyone to access "/node".

  1. I don't want that to end up in Google Search Results.
  2. I don't want prying eyes to go through each and every content in case something should accidentally not have been made public.

So my question is: what is the most correct way to block /node? Or should I keep it open and rather let robots.txt avoid that path?

UPDATE

To make matters worse, it seems I have set everywhere in my permissions that certain content types must not be viewable by certain roles. However, those pages are still showing up under /node ?

  • The questions boils down to one thing: how to correctly block access to /node? The permissions I think is a problem on my side with my hood override, which I will fix myself. – coderama Feb 10 '15 at 6:14
0

You can probably use this code with your custom module:

function hook_menu_alter(&$items) {
 $items['node']['access callback'] = FALSE;
}

Note: If you want specific people to access this page, you can set "access arguments" declared with hook_permission

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