tags:

views:

17

answers:

1

I have a CMS kept at seperately folder in my Website, lets name it public_html\cms for now. I want this folder initially locked using .htaccess and later on when a moderator comes, he must be able to login and gain access to the folder CMS.

How do build this?

A: 

You will need to use the option of Password protected directories, in this case. One of the nice tutorials is of Corz. Please check out this whole page & search for the section of Password protected directories... Here you will find your requirement. Another nice tutorial is this one.

You will need to set up a Authorization password for that particular directory, which must also be made known to Administrator. So now, whenever the Administrator will want to go into that folder, he will need to type in that secret Password, which you had initially set it up.

Whenever you will need to change the password, you will need to either change it manually in the ".htpasswd" file, or you will need to overwrite this file using PHP's file writing built-in functions.

Hope it helps.

Knowledge Craving
Can this password, be dynamic. I mean can I change it using PHP or mysql
mrNepal