in reply to Re: Viewing .dat files
in thread Viewing .dat files

ikegami :
 ...
 ForceType text/plain
 ...
Such solutions won't work if the document root
is away from the script path. There won't be any
allowed accesses into /cgi-bin/ without extra configuration
(which you don't really want to do this way).

You won't get around sth. in the lines of this: Re: Viewing .dat files

Regards

mwa

Replies are listed 'Best First'.
Re^3: Viewing .dat files
by ikegami (Patriarch) on Oct 08, 2007 at 18:43 UTC

    If ScriptAlias causes problems with ForceType, a more sensible solution would be to put the .dat in another directory rather than breaking caching, HEAD requests, conditional requests, partial requests, etc by reimplementing the wheel.

    I particularly like how your script checks if a file exists but returns 200 OK either way.