CodeIgniter Forums
How can I prohibit direct access to a file in the download? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How can I prohibit direct access to a file in the download? (/showthread.php?tid=59444)



How can I prohibit direct access to a file in the download? - El Forum - 10-05-2013

[eluser]Hermes Alves[/eluser]
I want a make system that will release the download only to registered users, so I would like to prohibit direct access to the files in my folder /download/.

How do I program something that you can just download for users duly registered?

Even with the direct link does not work direct download.


How can I prohibit direct access to a file in the download? - El Forum - 10-08-2013

[eluser]Aidy[/eluser]
I would move the downloads folder out of the web root or you could protect with "deny from all" in a .htaccess file. Then take a look at codeigniter's download helper.