Jump to content

Protected download folder


mrcastle

Recommended Posts

I want to have a folder where I can put files, images, etc... which won't be accessible from the outside but still be accessible from my web site.

 

With .htaccess I can prevent direct access to a folder's content. This works fine when I need to include a PHP file that I don't want accessible directly, but it blocks access if I link to a .zip for download (obviously).

 

So, basically what I'm wondering is if there's a way, via PHP and/or .htaccess that I can have a folder (or 2/3 separate folders) that contain :

  • PHP files accessible only when included from a file on my server (easy enough...)
  • Images, ZIP files and other files which can only be downloaded/included/accessed if linked to or included in files on my server.

 

Hoping that made sens...

Thanks for any help!

Link to comment
https://forums.phpfreaks.com/topic/190615-protected-download-folder/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.