Access Services Software Help Center Policies Jobs
home >> services >> web >> protection

Web Directory Protection


Users and Groups > Step 2: Directory Access Rules


Create directory access rules

Access rules for a directory are set in a file called .htaccess, and apply to all sub-directories and files in the directory.

The file should look something like this:

require valid-user

To create the rule file, do the following:

  1. Open up a plain-text editor (i.e. Notepad).
  2. Enter one of the following rules:
    • require valid-user
      permit access to all users in the htusers file
    • require user "USERNAME"
      permit access to the user "USERNAME" (i.e. joe) only
    • require group "GROUPNAME"
      permit access to all users in the group "GROUPNAME" (i.e. bruins)
  3. Save the file as ".htaccess" (include the period and the quotation marks).

Configure CuteFTP to display hidden files

On the BOL FTP server, filenames beginning with a period (such as .htaccess) indicate that the file should be hidden. CuteFTP does not display hidden files by default, so you'll need to change that by doing the following:

  1. Open the Site Manager.
    • Click the open book icon (first on the left by default) on the toolbar, or
    • Go to Tools menu > Site Manager > Display Site Manager
  2. If you haven’t already, create a connection to your BOL FTP site.
  3. In the Site Manager, select the site from the list on the left.
  4. Select the Actions tab and click the Filter... button.
  5. In the Filter window, check the boxes for Enable filtering and Enable server side filtering (server applies filters).
  6. In the Remote filter: field, enter -a (dash ‘a’) and click the OK button.
  7. Click the Connect button to connect to your BOL FTP site.

Upload the file

Upload .htaccess to the folder you want to protect.

  1. Connect to your BOL FTP site.
  2. Navigate to the folder you want to protect. (public_html, if you want to protect your entire website)
  3. Upload .htaccess.
    Note: If .htaccess "disappears" after uploading, see Configure CuteFTP above.

Continue to step 3...

Go back to step 1...