I'm using a origin-pull CDN to distributed files quickly right now. It pulls the files from the origin, including the "type" of the file (download/octect-stream right now) and outputs it to the client.
For that I have the following webserver structure:
In the directory "files", I have put a .htaccess file to force a download (otherwise it would just start streaming the video file):
<Files *.*> ForceType application/octet-stream Header set Content-Disposition attachment </Files>
Now, I would like to allow for both downloadable files and streaming files from the same folder. As you can create "aliases" of a folder using the same .htaccess file, I would like to create the following:
http://www.server.com/files/code/file.mp4 -> download http://www.server.com/streams/code/file.mp4 -> "stream" exactly the same file
How can this be done?