Controlling access to your pages

Although the standard model of web sites is to allow everyone to see everything on a web site, there may be occasions when it is necessary to restrict access to certain pages on your site, or give certain pages on you site aliases.

htaccess is a utility which can be used to control access to WWW pages. A range of access control methods are supported including access based on the domain name of the requesting client and userid/password methods.

Note: while htaccess can be used to prevent people accessing a document or folder, it does not provide a complete security solution - htaccess is not hacker-proof, it is not in itself adequate to secure sensitive information on the web. In addition, users with accounts on the same Unix system as the web pages may still be able to view this material using standard Unix utilities, such as cat.

htaccess can be used to:

  • Control access to directories or named files;
  • Restrict access based on user domain;
  • Restrict access using passwords;
  • Combine domain name and password access control, and;
  • Redirect one URL to another.

To learn about using htaccess, try one of the following tutorials from Apache or JavaScript Kit (there are also many other htaccess tutorials available).