CodeIgniter Forums
Protect a directory? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Protect a directory? (/thread-32038.html)



Protect a directory? - El Forum - 07-11-2010

[eluser]mzuser[/eluser]
I know first thing people are going to say is htaccess. I've tried two methods with htaccess, a redirect and completely disabling files.

HOWEVER...

This also makes this directory unusable by my site. Basically I have a folder of audio clips I'm trying to protect, while still allowing them to play on my website.


Any ideas?


Protect a directory? - El Forum - 07-11-2010

[eluser]jonyr[/eluser]
Maybe is a good idea to move this folder behind wwwroot.
In this way, the content of this folder couldnĀ“t be accessed from the browser.


Protect a directory? - El Forum - 07-11-2010

[eluser]Buso[/eluser]
the htaccess example from the userguide should work too

http://ellislab.com/codeigniter/user-guide/general/urls.html


Protect a directory? - El Forum - 07-12-2010

[eluser]John_Betong[/eluser]
Try this method:
http://johns-jokes.com/downloads/sp/memilanuk/