I've posted on this previously but don't know if I was clear.

I need to use .htaccess to restrict access to a particular node only to those already logged in to the intranet at my university. But technically, these nodes don't exist as folders. How can I do this??

Comments

Dublin Drupaller’s picture

Not sure how to do it using .htaccess..I would find it easier just to use a module..

Can I recommend the simple access module that allows you to specify who can see or not see specific nodes?

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

deepak@dipak.org’s picture

.htaccess file is more complicated than it seems at first. You need to put a statement similiar to the following in your .htaccess file:

 # Restrict file access (forbidden error) based on IP
 RewriteCond   %{REMOTE_HOST}                  ^128\.0\.\.1$
RewriteRule ^node\3$ - [F]

The above assumes you are using clean url's and only checks for the remote ip and not if a user is logged in or not.

Read more about mod_rewrite here: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

Deepak