If you have access to do so, set the mime types for the directory to text/plain .txt (type/subtype .ext) and then do a frameset with a separate content window for the .txt files. That SHOULD do it. I can't think of a way to load a .txt file into the same window where Content-type: text/html has already been sent in the header. But let me know if you find another way.