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 TextEdit.
  2. If you see the formatting toolbar (Styles, Spacing, Lists, etc.) on the editor window, select Format menu > Make Plain Text.
  3. 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)
  4. Save the file as .htaccess (include the period).
  5. Note: You may need to uncheck the box for If no extesion is provided, use ".txt".

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. Go to CuteFTP Mac menu > Preferences.
  2. Select Display from the list on the left.
  3. Check the box for Show remote hidden files and folders and click the OK button.
  4. Open the Site Manager.
    • Click the book icon (first on the left by default) on the toolbar,
    • Go to File menu  > Site Manager, or
  5. If you haven’t already, create a connection to your BOL FTP site.
  6. In the Site Manager, select the site from the list on the left and click the Edit button.
  7. In the Site Properties window, check the box for Show hidden files and folders and click the OK button.
  8. 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...