If you wish to limit who may visit a specific directory of your web site, placing a .htaccess file with the following code will either allow or deny them. This feature is used when you wish to secure an area of your web site based on the IP address of the visitor. If someone who has been denied access visits this page, they will receive a 403 error code response page which you may customize using the ErrorDocument directive.
Example 1: Allow only 1 IP
This will only allow a visitor with the IP address of 127.0.0.1.
When you wish to display the contents of a directory similar to Windows Explorer or Mac’s Finder application, you should enable the option of Directory Browsing. This will display a list of files in the directory that you place the .htaccess containing this code.
While Netfirms provides a method of password protecting directories via the Netfirms Control Panel, you may run out of available slots. If this happens, you must manually password protect your directories using a .htaccess file. There are two steps to creating a password protected directory or folder that you must complete. First is the creation of the .htaccess file as well as the creation of the .htpasswd file.