Host Filtering


To deny/allow access on the basis of hostnames, all that you need to do is to create a filen named .htaccess in the directory that you want to protect. The .htaccess file should contain a Limit directive and the appropriate order, allow, and deny directives.

Example

Suppose that I have a directory named cool_stuff under my public_html directory and it contains stuff that is so incredibly cool that people from AOL shouldn't be allowed to see it. I could create a file called .htaccess in the directory ~/public_html/cool_stuff. If I put the following in that file: <Limit GET> order allow,deny allow from all deny from .aol.com </Limit> then accesses from the domain aol.com will be refused.


Maintained by:
www@nmia.com