My .htaccess file looks like this :

Options +Indexes

When I look at the directory from my browser, it looks like this:

enter image description here

File names that are too long are truncated, how can I make it show the whole file name?


Easy! Just use the Apache IndexOptions directive in addition to Options +Indexes in the .htaccess file.

In your case this would be simple enough to show the full names of files:

Options +Indexes
<IfModule mod_autoindex.c>
  IndexOptions NameWidth=*

The key for you is the NameWidth value which when set to a wildcard value of * will show the full length of the file and directory names.

This site has some great examples on how to better customize and style your directory listings with IndexOptions. Ditto with this site’s examples as well.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.