Code SnippetsStyling Apache Indexes Syndicate content

Thu, 01/25/2007 - 21:27

The default output of Apaches Options +Indexes doesn’t look good at all. Very 1990 something… But - as with pretty much any open source open source software - there are tons of options, which enable you to change everything to your likings!

The contents of .htaccess
  1. # default order: descending by name
  2. IndexOrderDefault Descending Name
  3. # set the following options:
  4. # - ignore case
  5. # - don't display the description column
  6. # - display folders first
  7. # - set the width of the name column to 40 chars
  8. # - don't display the default HTML output (doctype, head, ..., starting <body> tag)
  9. # - use Fancy Indexing
  10. # - set IconHeight und Width to 16 pixels (FamFams Icons use these dimensions)
  11. IndexOptions +IgnoreCase +SuppressDescription +FoldersFirst +NameWidth=40 +SuppressHTMLPreamble +FancyIndexing +IconHeight=16 +IconWidth=16
  12. # we want to use indexes for this folder!
  13. Options +Indexes
  14. # the header template, which is displayed before the list
  15. HeaderName ../list_header.html
  16. # the footer template, which is displayed after the list
  17. ReadmeName ../list_footer.html
  18. # don't display the link to the root folder
  19. IndexIgnore ..
  20. # set the default icon to a fancy famfam icon
  21. DefaultIcon ../images/bricks.png

To see it in action visit the Typogridder download folder. Also take a look at the header template and the footer template.

Note: The icons I use are created by Mark James. Kudos and thanks go to him, for creating such beautiful and free icons!

Going Further

If you want to see what more is possible to do with apache, take a look at the following sites:


Thank you very much for Wed, 02/13/2013 - 13:50 — Diego (not verified)

Thank you very much for sharing this! It was exactly what I was looking for.

Post new comment

  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options