Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatically display text files

Status
Not open for further replies.

Farab

Programmer
Mar 20, 2001
60
GB
At the moment when I browse a directory in IE via Apache server and I click on a .txt file, the server/browser displays the contents of the file in the browser window. When I click on .log files, it comes up with the pop-up asking if I want to open it or download it.

How do I configure Apache (assuming this is where to do it) to display the contents of .log files like it does with .txt?
 
Hi mate,

This is your browser settings. Just choose to open the log file with a txt editor and if you are using Windows check "Always use this application" or whatever the wording is.

Currently, your browser does not recognise the .log extension and because of this, tries to download it.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
No, not what I'm after. Currently .txt files are opened in the browser itself (in the IE window), an application like notepad or word is NOT being opened to display it.

This means that the server is somehow converting the text contained in .txt files to html to be able to display in the browser. I want the same to happen to .log
 
I'm having a similar problem in working with .doc files. Sometimes the browser will open without a prompt, othertimes I'm prompted to open the file. There is already a mime.types line for doc files.
application/msword doc

 
Wullie was right in his 1st post: it's browser/client station OS only issue. No need to convert txt to html: any browser can display texts directly in its window.
About docs: the browser never display Word docs, it call Word via COM for that (IE, at least). Display or prompt may depend on URL security area settings...
 
Tried adding site to list of trusted sites, with same result - security window still comes up. Unchecked box asking if you want to get prompted to open these types of docs - same result - didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top