Prevent downloading of your files by URL

Est. Reading: 1 minute
By: erisal
Created: 07/08/2017
Difficulty: Intermediate

Prevent downloading of your files by URL

×Warning: This tutorial was created 2475 days ago. Some of the information may be out of date with more recent versions of Formidable. Please proceed with caution and always perform a backup before adding custom code.

Edit the .htaccess file located at the root of your site and copy this code at the end:

# BEGIN Protect
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteRule . - [F] [L]
# END Protect

If you don't have an .htaccess file, create it.

Replace "" by your domain.

Your users and you will always have access to your files by your site but it will not be possible to download them by their URL.

If you do tests do not forget to clear the cache of your browser.

My knowledge is limited in this domain, suggestions from pros are welcome.

There are only 2 plugins for managing user access: "Advanced Access Manager" and "User Access Manager" (more oriented Group)

Leave a Reply

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community