I am trying to restrict access to a folder on our web site, by creating a .htaccess file using Dreamweaver, but I either get an internal server error, or the access restriction simply does not work. What are some possible reasons why?

In order to properly restrict access to a folder on your web site using a .htaccess file, you must use UNIX or DOS line breaks. We strongly recommend that in your preferences you set your Line Break Type to LF (UNIX). If you do not have Dreamweaver, we recommend using Notepad to create your .htaccess file (for PC users), or SimpleText (for Macintosh users). Even if you have used either of these text editors, the FTP software that you use to upload the file may change your line break type. Your FTP software may have an option to allow you to set your Line Break Type to LF (UNIX), or to set the Server Type to UNIX, or to set the Format Type to Automatic.

Also, your file must be named .htaccess. A common error is to save the file as .htaccess.html. You may find that your file extensions are not visible on your computer, and you are not able to see the .html or .htm at the end of your file name. Try saving the file again, by going to File > Save As, and save the file with quotations marks around the file name, as follows:

".htaccess"

Another common error is to type in the code for your .htaccess file in Design View in Dreamweaver, which adds unwanted HTML tags to your .htaccess file. To check for HTML tags in your .htaccess file, open it in Dreamweaver, and go to View > Code. An example of a correctly formatted .htaccess file is as follows:

AuthType weblogin
<Limit GET POST>
require user smix
require user ryeany
require user mendez
</Limit>

An example of an incorrectly formatted .htaccess file is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
AuthType weblogin <br>
<Limit GET POST> <br>
require user smix <br>
require user ryeany <br>
require user mendez <br>
</Limit>
</body>
</html>

Also, syntax errors in your .htaccess file can cause the internal server error to occur, such as a missing space between two words, or a misspelled word. If you are getting an internal server error, check the formatting of your .htaccess file.