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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.