directory protect

What does Dirprotect generators do ?

It generates 2 files : .htaccess and .htpasswd required to protect access to a directory on a website. help
See a live demo ? (username : demo and password : demo)

directory  Step 1 : Htaccess file generator

how can i know this path ? (demo is the directory i choose to protect)

1) Create a file called path.php with Notepad and add this php code :
<?php echo realpath('path.php'); ?>

2) Send this file to your website root (with ftp software) then go to the url :
http://yourwebsite.com/path.php

You should see on screen a path like this : /home/websiteinfo/yourwebsite.com/path.php
(The path you see could be shorter, longer : depends on hosting settings)

3) Add the name of the directory you need to protect on your website just at the end of path like this /home/websiteinfo/yourwebsite.com/demo/ (then complete the input with)


generate-htaccess


lock  Step 2 : Htpasswd file generator

See more info ?

This generator will encode your password and generate the file required.



generate-htpasswd


lock  Step 3 : Send the directory (with those 2 files)

See more info ?

Send the directory demo (which contains the 2 files) to your website (add others files you want to protect into this directory). Going to url : http://yourwebsite.com/demo/afile.html or another files of this directory, will ask you to enter a username and password to access to the area.
(Tips : i recommend to always add a file index.html (with by example just a text : hello), into the directory you want protect, some server need it to work.)


Bookmark and Share





© 2009 - Dirprotect.com - Contact and Feedback - Unit Converter