DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   htaccess to hide directory listing! (http://www.daniweb.com/forums/thread147008.html)

ike185 Sep 21st, 2008 6:11 pm
htaccess to hide directory listing!
 
Hello guys,

I and my project team at varsity finished up a website with a database back end. We developed it on a Windows system but now deploying to a Unix server. We used the Yellow duck framework. We've managed to work out compatibility issues as Unix is very sensitive (which is good in my view :-)).

There's one problem we don't know how to solve yet. Students can view our directory listings on the web and can also see the code for our template files but not the php ones, and we've spoken to the web admin and he said we should use .htaccess and this will be solved. I have done research but can't come around how to do this. Unfortunately am not Unix savvy yet but will get there.

Please any help will be appreciated.

Many thanks in advance.

Ike185.

Will Gresham Sep 21st, 2008 6:21 pm
Re: htaccess to hide directory listing!
 
A quick web search will bring up the answer you are looking for, the option is called
Indexes
in the Options within the htaccess file add
Options -Indexes
(if you already have some Options listed, add the -Indexes to the end.

Further reading:
http://www.clockwatchers.com/htaccess_dir.html

buddylee17 Sep 21st, 2008 7:25 pm
Re: htaccess to hide directory listing!
 
If you'll add an index file to the folder, the directory files wont be listed. Obviously this is a short term solution to the problem. The better, long term solution, was already made by Xan.

ike185 Sep 29th, 2008 5:57 pm
Re: htaccess to hide directory listing!
 
thanks a lot xan and buddylee17.


All times are GMT -4. The time now is 5:47 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC