Jump to content

Restrict access to folders/files


einherjer

Recommended Posts

Hello everyone,

 

I was wondering if anyone could help me with the following problem:

 

On a website, I will have several PDFs that I need to make available if user gives correct password or is in a given IP range. My first thought was to use .htaccess, but the host doesn't support that. they do support .htconfig and I didnt find any way of using that to resolve my needs.

 

If there any walk around in this situation using PHP and MySQL?

Link to comment
Share on other sites

Oops, I forgot to mention - if you're using php to do the authentication, then your script will have to print out the file as well.  The files can be kept somewhere that can't be accessed via the webserver.  If you simple link to the file, then someone who knows the link can simply download it directly.

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.