Indiana University Bloomington

School of Informatics and Computing

CSG FAQ

Q: How do I limit access to my web pages by hostname or domain?

Please Note: This FAQ entry describes a mechanism to limit access to web pages via the web server. If you also want to prevent access by people with local CS accounts, you MUST take extra steps to prevent access via the local filesystem. Please see the corresponding FAQ entry for more information.

As an example, assume you want to limit access to the pages in a directory to only be accessible from cs.indiana.edu hosts. Simply create a file in the directory named .htaccess that contains the following:

deny from all
allow from .cs.indiana.edu
You can have multiple allow lines, as needed.

Note that .htaccess files must be readable by the web server which is most easily accomplished by making the files world readable (chmod 644).




See an error in this FAQ entry? Please report it.

[Return to the FAQ index]