Prevent direct download using htaccess php

This post will help you to prevent direct downloading from folder.

This post will provide security to your website from stealing your files from the server.
Follow two simple steps, and secure you website from unauthorised downloads.

Step 1. Create a .htaccess file in the folder where doc files are stored and copy the below code paste it

Step 2: Create download.php, and copy the below code and paste it, just replace the PATH of you file