htaccess password protection and htpasswd file generator

.htaccess is a configuration file for Apache web server with directives to make some config changes on a per-directory basis. You can use it to create basic authentication on your website to protect some directories and all it's subdirectories and files from unauthorized access. It's used together with .htpasswd file, which contains usernames and encrypted passwords of your members. With AuthPro you can easily setup and manage .htaccess based password protection and generate and update .htpasswd file with your active members list.

How it works
You will need to upload our PHP script which will create basic .htaccess config file and generate actual .htpasswd password file with your AuthPro members list.

Requirements

  • Web server which supports .htaccess file directives (Apache)
  • Basic PHP scripting language support

Installation

  1. Download php script here

  2. Open downloaded script in any text editor and complete configuration section:
  3. $account='Your Authpro account username';
    $api_key='Your Authpro account API key';
    
    $folder_name='Members area';
    $folder_path[0]='/home/website/www/members/'; # Primary path, must be defined
    //$folder_path[1]=''; # specify additional folders if needed
    • specify your AuthPro account username and API key in $account and $api_key variables
    • type your members area folder path at $folder_path[0] variable
    • if you want to protect multiple folders on your website you can specify them using $folder_path[1], $folder_path[2], etc.. variables

  4. Upload configured PHP script to your website

  5. Check if uploaded script is working properly by opening it's url in browser

  6. Inject uploaded PHP script in your website HTML code by adding script tag:
  7. <script src="http://your.webite.url/authpro.php"></script>
    (use actual URL of uploaded AuthPro script on your website in script code).

Please contact us if you have any questions.