How do you restrict a .html file/page with drupal so that only logged in users can access it?

Basically I have this .html file I need to put up, I don't care whether or not it's a content-page or just simply a file - but I need only those who are logged in to be able to access it.

I've tried simply pasting the html-code in content-creator (read; /?q=node/add/page), but that crashed my site and I had to manually remove the node from the database to get it working again - so that's not an option.

2 Answers 2


As Shawn Conn said Content Access module works here but the Working with files in Drupal 7 documentation is also useful. check it out.


The Drupal way of doing this is to pull out the content from your HTML file; you don't need to paste the entire contents into the node body, that will break your site's theme.

Once you've created the node with the content you've pulled out of the HTML file, you can use the Content Access module to restrict viewing of the node to only authenticated users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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