Hi,
I installed FrondEndUsers and CustomContent modules and created a protected page where I placed a link for a file to download. Everything is worlking fine.
Now I tried to protect the file from direct download. I read the forum and tried a .htaccess file with
Deny All
Allow from 127.0.0.1
It worked. Direct access wan't possible any more. Unfortunatly the access via the website was denied too :C
What's wrong?
Thanks in advance.
Christian
Protecting files download
- Erich le Ghaz
- Forum Members
- Posts: 32
- Joined: Wed Feb 07, 2007 2:55 pm
- Location: Germany
Re: Protecting files download
use uploads module for the download link
Re: Protecting files download
Deny All, means just that...prohibit anyone and everyone.
Allow from 127.0.0.1 means that only users of the local system would be able to download, this means only users of the server, no remote connections.
Allow from 127.0.0.1 means that only users of the local system would be able to download, this means only users of the server, no remote connections.
Regards,
Sy

Sites built with CMSMS:
http://www.eska.co.uk, http://avasig.com, http://www.pygmygoats.co.uk, http://www.agsbuildersltd.com, http://onlineslotracing.com
Sy

Sites built with CMSMS:
http://www.eska.co.uk, http://avasig.com, http://www.pygmygoats.co.uk, http://www.agsbuildersltd.com, http://onlineslotracing.com
Re: Protecting files download
My .htaccess file reads like this:
It is located in a directory called "secure" off of "uploads". Seems to work for me in conjunction with FEU and CustomContent. I found it on this forum a while back but can't recall where 
If I'm logged in as a FEU user, the downloads work. If not, they don't.
Try this maybe?
Sorry, forgot to mention that the links to the files only appear on the page if you are a logged-in FEU user.
Code: Select all
SetEnvIfNoCase User-Agent "^$" locally_linked=1
SetEnvIfNoCase Referer "^http://www.your_site_name.com/" locally_linked=1
Order Deny,Allow
Deny from all
allow from env=locally_linked

If I'm logged in as a FEU user, the downloads work. If not, they don't.
Try this maybe?
Sorry, forgot to mention that the links to the files only appear on the page if you are a logged-in FEU user.
- Erich le Ghaz
- Forum Members
- Posts: 32
- Joined: Wed Feb 07, 2007 2:55 pm
- Location: Germany
Re: Protecting files download
Hmm Uploads module is no big help I suppose. I installed it, created a category, uploaded a file and... it was still accessible with an direct link.
Maybe I forgot something?
Maybe I forgot something?
Last edited by Erich le Ghaz on Sat Oct 20, 2007 5:42 pm, edited 1 time in total.
- Erich le Ghaz
- Forum Members
- Posts: 32
- Joined: Wed Feb 07, 2007 2:55 pm
- Location: Germany
Re: Protecting files download
monghidi,
your htaccess is not working, too. I put it under uploads/protected, but could still download the mp3-file with an direct link.
Christian
your htaccess is not working, too. I put it under uploads/protected, but could still download the mp3-file with an direct link.
Christian
Re: Protecting files download
Hello Christian,
tell more about your hosting context : provider, OS, versions, settings...
Pierre M.
tell more about your hosting context : provider, OS, versions, settings...
Pierre M.