It is currently Thu Mar 28, 2024 10:05 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: How to disable Directory Listings ?
PostPosted: Tue Mar 15, 2005 3:39 am 
Noobie
Noobie

Joined: Tue Mar 15, 2005 2:37 am
Posts: 7
If I specify my URL to particular subdirectory without including specific file name, then I got the content of that directory listed.

I wonder is there any way to disable it ? - I don't want my visitors see the directory listings.

thanks.


Top
 Profile  
 
 Post subject: Disable directory listing
PostPosted: Tue Mar 15, 2005 4:15 am 
Noobie
Noobie

Joined: Sat Mar 12, 2005 2:28 am
Posts: 1
Just add an index.html / index.htm / index.php file into each of your directories, then redirect it to your page using

header('yourpage.html');

or javascript

-AdR-


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 2:58 am 
Noobie
Noobie

Joined: Tue Mar 15, 2005 2:37 am
Posts: 7
wow ! it would be a very tedious work !

I think, ideally the admin should disable directory listing by default for security consideration.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 2:41 pm 
Moderator
Moderator

Joined: Fri Feb 11, 2005 5:38 pm
Posts: 850
Location: in a tent outside..
well , then how will you view that folder if you ever needed too? :D

_________________


Top
 Profile  
 
 Post subject: Re: How to disable Directory Listings ?
PostPosted: Wed Mar 16, 2005 5:15 pm 
Noobie
Noobie

Joined: Sun Mar 13, 2005 1:12 am
Posts: 21
denisw wrote:
If I specify my URL to particular subdirectory without including specific file name, then I got the content of that directory listed.

I wonder is there any way to disable it ? - I don't want my visitors see the directory listings.

thanks.

if you have Index.html orIndex.php it ruins everything. try index.html lowercase it


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 5:17 pm 
Moderator
Moderator

Joined: Fri Feb 11, 2005 5:38 pm
Posts: 850
Location: in a tent outside..
it can be upper case and lower case

_________________


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:14 am 
Noobie
Noobie

Joined: Tue Mar 15, 2005 2:37 am
Posts: 7
Quote:
well , then how will you view that folder if you ever needed too?


of course I would only need to manage my subfolder for administrative purpose from CONTROL PANEL - FIle manager
NOT from BROWSER whereby anyone can list my subfolder contents.

Well, basically what I need is,
if someone visit my website without specifying a correct URL (due to mistype, or file doesn't exist), then the server should notify the user with such message like : "access denied'. or whatever...


Last edited by denisw on Thu Mar 17, 2005 2:19 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:16 am 
Moderator
Moderator

Joined: Fri Feb 11, 2005 5:38 pm
Posts: 850
Location: in a tent outside..
but if you wanted to share some files and keep it open so visitors can view that folder , you would no longer be able to.

_________________


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:18 am 
Noobie
Noobie

Joined: Mon Mar 14, 2005 1:39 am
Posts: 19
Location: Armenia
I like the folder directory thing, etc. There should be a choice thing if you want it ON or not, but it's not hard to make a blank index.htm page. :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:24 am 
Noobie
Noobie

Joined: Tue Mar 15, 2005 2:37 am
Posts: 7
I'm not familiar with Nix system. But what i've ever found on M$ system (IIS), we can set permission on particular folder whether we would enable DIRECTORY LISTiNG or not.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:25 am 
Moderator
Moderator

Joined: Fri Feb 11, 2005 5:38 pm
Posts: 850
Location: in a tent outside..
well you can always CHMOD the folder

_________________


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:26 am 
Site Admin
Site Admin

Joined: Fri Feb 11, 2005 7:43 am
Posts: 1818
Location: 100WebSpace's Headquarters
Yes, but this will not disable directory listing only :) Actually there is not an automated way to do this here - you can use an .htaccess file, but you better do some googling to find out more about .htaccess.

_________________
Read the F.A.Q. before asking a question!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 2:30 am 
Moderator
Moderator

Joined: Fri Feb 11, 2005 5:38 pm
Posts: 850
Location: in a tent outside..
sorry , i meant file ... not folder :D hehehe

_________________


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 11, 2007 2:54 am 
Noobie
Noobie

Joined: Tue Oct 04, 2005 9:45 pm
Posts: 13
Location: Exeter, UK
To disable indexing you should be able to add the following line to a .htaccess file.

Code:
Options -Indexes


This will disable indexing in the folder containing the .htaccess file and all the sub folders (unless overridden by a .htaccess file in a subfolder).

This is one of the easiest methods of disabling indexing.

For some reason 100webspace has choosen to disable this option on the server so the line in a .htaccess file will report a server error. I really don't understand why they have disabled it because it doesn't allow users to secure their folders structure properly.

Writing blank/redirecting index.htm files in every subfolder of any decent size site would possibly take hours. With the .htaccess it takes 1 file and 1 line of code. It would be helpful if they enabled this option.

Attempting to access a folder which has indexes disabled would result in a 403, Access Denied error.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 11, 2007 10:31 am 
Support Team Member

Joined: Thu Feb 10, 2005 5:44 pm
Posts: 373
Unfortunately this will not work on our servers. This may cause system conflict and your page will open with error.

_________________
Best Regards,
Viktor
www.100WebSpace.com Support Team


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 5:09 pm 
Moderator
Moderator

Joined: Thu Dec 15, 2005 2:59 pm
Posts: 681
Location: England
You could always add a login script to the files you dont want people to see, or simply add an index.html file and name the files with names such as 454545.jpg etc..

_________________
Mountain biking forum ;)
Ponds and fishkeeping :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011