Hide Icon? and other files in Apache directory listings

Jul 16, '03 10:34:00AM

Contributed by: Anonymous

One thing I do from time to time is share a folder structure in many ways. This could include HTTP and AppleShare both (especially using SharePoints or equivalent to share a folder structure separate from the user's Public Site). However, if I allow Directory Listing for that folder structure, I end up with that ugly "Icon?" file, assuming that I added my own, more pretty or informative icon to any of the folders in the Finder. So, I looked up the correct directive to hide any file/folder pattern in Apache, and blocked that darn "Icon?" file from showing as follows:

  1. Become the root (superuser)
  2. Type cd /etc/httpd
  3. Edit httpd.conf (using your favorite editor - vi is mine)
  4. Find the string "IndexIgnore"
  5. Add Icon? to the end of that line. The line looks as follows (once the change is added):
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t Icon?
  6. Write and Quit
  7. Retart your Apache Web Server (Personal Web Sharing).
Cheers!

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030713152519959