Using the Rules module you can implement a rule that looks similar to this:
{ "rules_disallow_accesss_to_selected_urls" : {
"LABEL" : "Disallow access to selected URLs",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "init" : [] },
"IF" : [
{ "text_matches" : {
"text" : [ "site:current-page:url" ],
"match" : "content\/video-1",
"operation" : "regex"
}
}
],
"DO" : [
{ "drupal_message" : {
"message" : "Sorry, access to URLs like [site:current-page:url] is not allowed ...",
"type" : "error"
}
},
{ "redirect" : { "url" : "no_access" } }
]
}
}
Anybody trying to access relative path content/video-1
will be redirected to a page with path no_access
, and a related error message will be shown (adapt this path to fit your own conventions, and review the message to be shown).
The above rule only restricts access to relative path content/video-1
(as in your question). If you want to expand the rule to similar URLs, change content\/video-1
to something like content\/video-\\d+$
, or any variation that fits the naming convention of your paths.
The above rule does not (yet) take into account to only apply the Rules Action for users with selected roles only. But for anybody a bit familiar with the Rules module, that is a straight forward "Condition" to add ... eg: skip the rules action for users with a role like editor, administrator, etc. Which you can do by adding a Rules Condition like "user does NOT have role administrator (and/or editor)". That way those kinds of special users can still view such nodes anyway (without such extra condition they also cannot view such nodes anymore ...).
To experiment with this rule in your own site, just copy the entire Rules code above, and paste it in a new Rule in your own site, created via the "Import" function (available if Rules UI is enabled). Then further edit/refine to make it fit in your own environment (e.g the "Sorry, ..." message to be shown).
Additional refinement
In one of the other answers you added a comment that includes this:
... I wanted to redirect to home page in some cases, 404 in others, etc., so I had better control ...
If that's what you also want to do, then you can further refine the above Rules Action by adding the Conditional Rules module also. With that, for each of your "some cases" you can then specify the appropriate URL to redirect to. Refer to my answer to "How to set the values of some fields depending on the value of a list box?" for an illustration of how to use this module within a Rules Action.