index.html

How do I view a directory listing if I have an index.html file in that directory?  
www.mysite.com/home/dir1/index.html
How would I view the contents of dir1?
ueihpAsked:
Who is Participating?
 
chrisboltConnect With a Mentor Commented:
If the server is running Apache, create a file in that directory named .htaccess and insert the following text into it:

DirectoryIndex ________.____

Then the only way it will not show the directory listing is if someone uploads a file named ________.____

If you don't know which server software the server is running, just try putting that file in the directory and see if it works.
0
 
dedsiCommented:
Hi ueihp,

if you are using Windows I would suggest you to download "Directory -2- HTML" from winfiles.com.

Goto http://www.winfiles.com/apps/98/webauth-index.html and look for that program (second from top).

This is a program that will automatically generate a .html file of the contents in a specific directory.

Hope this is what you were looking for.

/dedsi
0
 
ueihpAuthor Commented:
I am not running windows.  Is there a simpler way.  If the index.html file does not exist in that directory all I normally have to do is type the dir i.e.  www.mysite.com/home/dir1/
but since there is a index.html file in there it automaticallys points to that page instead of the directory listing.  
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
dagonCommented:
tried ftp ?
0
 
ueihpAuthor Commented:
I am not running windows.  Is there a simpler way.  If the index.html file does not exist in that directory all I normally have to do is type the dir i.e.  www.mysite.com/home/dir1/
but since there is a index.html file in there it automaticallys points to that page instead of the directory listing.  
0
 
dagonCommented:
tried ftp ?
0
 
ueihpAuthor Commented:
ya it says user anonymous unknown
0
 
dagonCommented:
if using a browser-

ftp://<loginname>:<password>@<site address>

or use an ftp client and set those
0
 
dagonCommented:
if using a browser-

ftp://<loginname>:<password>@<site address>

or use an ftp client and set those
0
 
ueihpAuthor Commented:
Cool that works.  But I dont' think I will be able to use that either.  
Let me give some more info about what I am doing.  I have a program that lets users upload files to a dir.  after they upload the files I send them an email message to say "your file have been uploaded to <this directory>".  If they are using a "GUI" mail system they can just click on the link.  
now heres my problem if the user uploads a index.html file to that directory then thats the only file that can be view even if there are other files in the directory.
If I use the ftp thing then everyone will know my password and that wouldn't be good.  Is there a way I can just "disable" the automatic call of index.html?
0
 
dagonCommented:
If your the server administer you should be able to.
0
 
ueihpAuthor Commented:
It didn't work.  But I am just going to ask my system admin to fix this for me so I am closing this call.  Thanks everyone for your suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.