htaccess Security PHP Script


The safest way to protect your webspace with a login is via the .htaccess file. This is a file that contains rules to evaluate every single access to your webservers files and it can be configured to only allow certain users to do so.

This is being done with another file called .htpasswd. In this file you need to define the username and (encrypted) password for every user that should be permitted to access your files.

As the .htaccess and .htpasswd files are part of the web server and not a PHP script, they are not vulnerable to hacking attempts exploiting PHP bugs.

This whole process is quite technical and not every server can use the same password encryption method, making it a bit cumbersome at times to set this protection method.
Thats where ‘.htaccess Security Tool’ comes in.

You just have to upload the content of the zip file to your server via FTP (just one php file and one 22kb folder), browse to the {YOUR-DOMAIN}/htaccess-security.php and use our tool to setup the users easily!


  • Easy to navigate GUI
  • No technical expertise necessary to use the tool
  • Tiny (only 40kb, 14kb compressed)
  • Works with any CMS as it is a standalone tool
  • Not vulnerable to PHP bugs and exploits


  • PHP >= 5.2.9 (even this ancient version of PHP is still supported with this script)
  • FTP access to your server so that you can upload the files
  • .htaccess and .htpasswd support on your server (which is the web standard)


  1. Download the zip
  2. Connect to your website via FTP
  3. Upload the contents of the zip to the folder where you want the htaccess file to be (usually the root folder where your index.php / index.html resides)
  4. surf to the url YOUR_DOMAIN / INSTALLATION_FOLDER / htaccess-security.php
  5. Create users with the GUI (it should be self exlanatory, but you can click the help button at the top right to get more detailed information)