Jump to content

Directory Listing On Web With No Html


Recommended Posts

I have a few folders on my website that have no html and I want only to list several files. I noticed the default directory listing only shows the first 20 characters of the file name.

 

Is there a way to increase this to display the whole file name?

 

I know I can create an index.html file but I am always adding and removing files and I dont want to have to open up the file to add links to the files. Unless this can be automated?

 

Dennis

Link to post
Share on other sites

Or you could use a couple of .htaccess directives, add a readme.html and a HEADER.html and you get a very nice display. See This example

 

Thhe mod_autoindex documentation gives all the details on how to do this. I prefer the mod_autoindex method since it does not rely on yet another script that I have to keep updating :)

 

 

In the .htaccess

IndexIgnore robots.txt admin include scripts images style

IndexOptions DescriptionWidth=* NameWidth=*

IndexOptions +IconsAreLinks +SuppressColumnSorting +SuppressLastModified

IndexOrderDefault Ascending Size

 

 

AddDescription "US Government on how to stop ID Theft " IDTheftVideo.avi

etc

 

HEADER.html is some standard html

README.html is some text to describe the directory.

Link to post
Share on other sites

There is another way if you do not want to use a script.

In cPanel goto

Site Management > Index Manager

select the folder you want to change

then select

Standard Indexing (text only) > Save

Its not fancy but it allows for more than 20 characters. I tested it by creating a file with 50 characters.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...