ok, I see what you are saying (Sorry, I find this problem pretty interesting, and would love to get a solution, cuz I could use it somehwere in the future.)
How about this:
All of the files in your list go through the same script. For example, clicking on a file named "foo.txt" would link to something like this:
http://www.somesite.com/file/path/to/foo.txt
In this example the directory "file" is really a php script, written sort of like this : (it's a little bloated, but i thinkthe basic idea is almost right)
$url = $PATH_INFO;
$url_parts = explode("/",$url);
// get rid of "file"
array_shift($url_parts);
$cnt = count($url_parts);
// build the path
$path_to_file = implode("/",array_pop($url_parts));
// build the file name and extension
$req_file_name = array_pop($url_parts);
$req_file_parts = explode(".",$req_file_name);
switch $req_file_parts[1] {
case "txt" :
// do whatever
break;
}
Do you think that's close to being on the right track, or am I way off base?