Forum Moderators: phranque

Message Too Old, No Replies

htaccess help for newbie

         

Kickin

6:08 pm on Jun 26, 2005 (gmt 0)



I looked around and found a number of entries that touched on the subject but none seemed to help me. I want to block access to a specific page to all IPs except a handful. (i.e. my home IP, office IP, etc.) I know almost nothing about the subject so hopeful someone can point me in the right direction.
Thanks.

gergoe

7:10 pm on Jun 26, 2005 (gmt 0)

10+ Year Member



See the documentation of the Allow [httpd.apache.org] and the Order [httpd.apache.org] directives on the Apache website and check out the Authentication, Authorization, and Access Control how-to [httpd.apache.org] for explanation and examples. Additonally you may want to check the .htaccess tutorial [httpd.apache.org] as well.

You just need to put the directives with the desired ip addresses into the .htaccess file on the server in the directory you want to protect, and (if it has been made possible by the system adminstrator previously) it will take effect at once.