[Xitami] targeting file downloads
Michael diLorenzo
xitami@lists.xitami.org
Wed, 08 Jun 2005 03:06:50 -0400
Hi Rick, this just came to me when I went to bed, and I thought I'd get
up and test it and type it out real quick:
Changing the MIME filetype in the xitami configuration file (preferably
defaults.cfs) is probably your best bet. However, this will hose the
ability of the server to provide streaming type media or images when you
do want them.
A workaround for this would be to install two copies of xitami on the same
computer in different directories. In the second installation, make the
changes to the MIME types that Marc suggested, and change the portbase
from 0 to, say, 1000. That will cause the second server to listen on port
1080 for web traffic. Then, on your home page, create links to the media
files that include the reference to port 1080, such as
http://www.mydomain.com:1080/mymedia.wmv. This will cause the visitor to
hit your computer on port 1080, and the second xitami server will
respond. Since the second server is programmed to confuse browsers as to
the type of file, they'll get the download prompt.
In this way, you can have your server handle file types normally, but
point visitors to the second server when you want to force the download
prompt. You'll have to do the obvious shuffling of your media files to a
place that the second server can see, but I just tested this, and it works
fine on my system.
Now...what are you doing to do when the visitor clicks "Open" instead of
"Save?" :-D
Michael