[OT] [CM] display .ins files in textmode on the web

Ralf Mattes rm@seid-online.de
Mon, 26 Mar 2007 17:51:03 +0200


On Mon, 2007-03-26 at 16:20 +0200, Orm Finnendahl wrote:
> Am 26. März 2007, 16:12 Uhr (+0200) schrieb Achim Bornhoeft:
> > After putting a clm instrument with the .ins or .lisp extension on the 
> > net the file is displayed in html mode in my web browser, say all LFs 
> > are gone and the font is the default font.
> > What can I do to make these files look like plain text mode on the net.
> >
> 
> http://txt2html.sourceforge.net/
> 

Ne, ne, Orm, so geht's nicht ...

The problem here is the MIME-type the webserver sends to the browser.
There are several ways to fix this (all solutions assume an Apache
server):

  * Change the default mime type: 
    In your server configuration add/modify:
      DefaultType text/plain
    From now on the server will send 'text/plain' as the default 
    mime type. NOTE: this might have dramatic consequences on the 
    display of other web pages on the server depending on the 
    configuration.

  * Add/modify you mime database -- RTFM

  * tell Apache about the mime type:
    Again, in your server configuration add:
      AddType text/plain .ins
      AddType text/plain .lisp

    Probably the best solution.
     
Orm's solution would convert your code to a HTMLized version.

 HTH Ralf Mattes


> --
> Orm
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist