Technically, your "index.html" (or similar) page is your directory index, just as 404.html (for example) is your 404 page. If a default isn't there, the server comes up with its own default.
You would need to write a script to do this. A simple way might be to create a script within the cgi-bin, and use an index.shtml page to include it in. Perhaps have the cgi script determine the directory based on the referer URL...
The default index can be quite customized, but only within the server configuration (not within .htaccess AFAIK)...
------------------
Justin Nelson
FutureQuest Support