I am looking for the best way to restrict access to drupal pages such as /node, /filter/tips and /filter/tips/plain_text etc.

Do I add rewrite rules to the .htaccess file?


One way to restrict access to specific paths is to use the Custom Permissions module.

It allows you to create path based permissions at /admin/people/custom_permissions.

Then you can configure which roles have those custom permissions as you would any other permission at /admin/people/permissions.

I probably wouldn't use this solution if I had a very large number of paths to restrict but it's a very usable solution for a few pages, especially if you still want admins to be able to access them.

.htaccess restrictions are also possible if you want to go that way. That would mean there would be no database load involved in restricting access, which might be a consideration for very high traffic sites but would generally be negligible for an average site.

| improve this answer | |

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.