Hiding/Viewing http directory listings

Soldato
Joined
6 Nov 2002
Posts
9,946
Location
London UK
Quick question, I know the easiest way to prevent people looking through your online folders is to drop a blank/simple index.htm into it but I sometimes find it handy being able to access the listing remotely when I only have http access.

So is there anyway to have say a blank index.htm present but then another file (eg. ListMyFiles.html) that will list the contents of the folder?

Or alternatively a server side file uploader (PHP/CGI) that would allow me to upload files/broswe folders over http (not ftp access via work so this would be ideal).

Does that make sense?

Thanks :)

PS. Wondering if my webspace is now gonna take a hit with people thinking I'm wanting to hide something. :p
 
Don't think that will work for my needs, I think this would protect all files in said folder, all I want to do is block directory listings but allow public access to all files via direct links. Although I may have this completely wrong. :p

Ah yeah, you right it will just protect the lot..


combin that with a php pass and ur set to go

<?php



// Define your username and password

$username = "someuser";

$password = "somepassword";



if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {



?>
 
Back
Top Bottom