Jump to content

Directory Listing Display


kshawkeye
 Share

Recommended Posts

I just got a new provider for my website and noticed that the directory listing is all messed up. It follows a bullet or unordered HTML list format, such as:

<ul><li><a href="/"> Parent Directory</a></li><li><a href="file.1"> file.1</a></li><li><a href="file.2"> file.2</a></li></ul>

I'm used to the standard:

<pre>	  <a href="?C=N;O=A">Name</a>					   <a href="?C=M;O=A">Last modified</a>	  <a href="?C=S;O=A">Size</a>  <a href="?C=D;O=A">Description</a><hr>	  <a href="/">Parent Directory</a>								-   	  <a href="file.1">file.1</a> 06-May-2011 10:11  4.3M  	  <a href="file.2">file.2</a> 18-Apr-2011 18:38  4.1M  <hr></pre>

Does anyone have any idea how to get the normal listing display back?

Link to comment
Share on other sites

There is no "normal" or "standard" listing display, the HTTP specification states that a 404 error should be returned when a file isn't found, and it is up to individual web server software to deviate from this standard by returning designated "index pages", dynamically generated HTML describing directory contents, or otherwise. If you want a certain format, then you should write an index page that generates the markup you want.

Link to comment
Share on other sites

  • 2 weeks later...
There is no "normal" or "standard" listing display, the HTTP specification states that a 404 error should be returned when a file isn't found, and it is up to individual web server software to deviate from this standard by returning designated "index pages", dynamically generated HTML describing directory contents, or otherwise. If you want a certain format, then you should write an index page that generates the markup you want.
Where is 404 error mentioned in the above post? What KSHawkEye is talking about is when the index file is non existent and shows a listing of what files/folders are in the particular folder@KSHawkEye - There are ways to make an index file that you can customize to show the folder contents minus the index file. But that would require putting this particular index file in each directory or redirecting to a single index file if the index in a folder does not exist (I think htaccess would do this, not sure though). Edited by dzhax
Link to comment
Share on other sites

Where is 404 error mentioned in the above post? What KSHawkEye is talking about is when the index file is non existent
The index is the 404. The server can be set up to show a folder listing if the index is not found, and that's what he's talking about. There's no standard that describes the format that listing should be given in. Many web servers don't even have it enabled in the first place, if there's no index it just returns a 404 and that's the end of it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...