How do I password protect a directory?

Securing a directory can be done in several ways.

Option 1: By securing the directory through the web.config.

The script below is an example of this:

.                         mode="Forms">                   passwordFormat="Clear">                       name="test" password="test" />                                                                 users="test" />                   users="*" />                                   path="admin">                                                   roles="admin" />                 users="*"/>                                            enabled="true" />                                                       enabled="false" />                       enabled="true" />                       enabled="false" />                                                



Option 2: By enabling the .htaccess option through the control panel.

You log in to control.myhostingpartner.nl

You go to websites.

How do I password protect a directory?


Then click on the domain in which you want to secure the folder.

How do I password protect a directory?


Then you go to the tab .htaccess.

How do I password protect a directory?

At show security options you can add the folder you want to secure.

Then you can apply the user and password for the secured folder.


How do I password protect a directory?

1 :

The arrows that indicate 1 relate to the htaccess file itself, here you can set the folder that needs to be secured. In this example we take the folder images.

2: Then you can first create a user/group at the arrows with name 2.

1: After adding the user you can go back to securtiy options and set the user as follows.

Assign User

How do I password protect a directory?


1 : This is the name you will see when you log in. Can be a mnemonic, or whatever you prefer.

2 : Have no further influence on this, this can not be changed in this step.

3: Can be chosen for basic, digest is also a possibility more information about the encryption method follows.

4: Here you must add the user to get access to the created .htaccess file.


Creating User

How do I password protect a directory?

Here you fill in the necessary data and make a choice for the security. Options can also be changed here afterwards.