Skip to main content

Protection

The paid variant of the agile Downloads module includes a simple function to protect documents within a folder. This is a modified version of this solution here. The protection function is implemented using a htaccess configuration in combination with a PHP script. If the protection function is activated in the module settings for a folder, the module automatically generates a htaccess file for this directory and stores it in the corresponding path.

If the protection function has been activated for a folder, all documents contained therein as well as the documents in subfolders are only available for logged-in users.

Important note!

Since the protection function applies to all documents located in the same folder and subfolders, it should not be used in a standard Joomla! directory. We recommend creating a new folder for example "private_downloads" in the root directory of your Joomla! installation.

Activate protection

The protection function for a folder can be easily activated via the module backend, click on the corresponding button to activate the protection. Activating the protection for a source is possible only after the first saving after adding it.

access security

Deactivate Access Restriction

To disable the directory protection you can simply click on the corresponding button for this folder in the Backend module to disable the protection. If for some reason you can't remove the directory protection via module settings, you can simply navigate via FTP to the corresponding folder and delete the .htaccess file there.

 

What happens when a user without access has a direct link?

The module will reject the request in such a case and forward the request to the start page. Additionally, a message is displayed that only logged in users are allowed to load the file. With some browsers, such a request may result in the download of an empty file.