Frontpage extensions preventing you from password protecting a directory? Print

  • 0

The conflict is that both programs want to write your .htaccess file.

The solution is to leave your FrontPage extensions On, and then add the code needed to password protect a folder.

Here is how to code the password protect:

1. Use FTP or File Manager to navigate inside the folder you want to protect.
2. Edit the .htaccess file.
3. Paste this code on a new line at the bottom. (You must replace username with your actual cPanel username.)

AuthUserFile /home/username/.htpasswd
AuthGroupFile /dev/null
AuthName "A Restricted Area"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

4. Navigate up to above public_html (The path is /home/username/)
5. Create a new file and name it .htpasswd, then edit the file.
6. You need a special encrypted line here. Use an online tool (htaccesstools.com or dynamicdrive.com) to create the encrypted line.
7. Paste the line and save the .htpasswd file.

Do NOT ever click the Password Protect Directories icon in your cPanel. If you do, it will overwrite the work you just did.


Was this answer helpful?

« Back