When making a directory listing (.htaccess "Options +Indexes"), the default view has very narrow columns.
I set up a directory to demonstrate (it will be available for the duration of this question) containing some public domain artwork I made: link. The directory listing in Firefox looks like this:
The listing in Chrome, IE, Safari, and Opera looks almost exactly the same. My concern here is that the width of the "Name" column is very narrow, especially in light of having a full HD screen with plenty of horizontal room.
The HTML is a simple table, with e.g. the "..>" signifying a longer filename being written explicitly in the HTML proper. So this is being generated by the HTTP server itself, I assume.
Is it possible to change this behavior so that file names can be longer? If not, why? If yes, how?
Take a look at the IndexOptions
directive in the .htaccess
file. Specifically, the option NameWidth
which you can set to either a certain number of characters or make it as wide as it needs to be:
IndexOptions NameWidth=40
for 40 character width for filename or
IndexOptions NameWidth=*
for auto width sizing. The options also allows you to set the widths of the other columns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With