I have a catalog of mp3 files that want to be able to serve them inline or provide the user with the ability to download based on the request URI.
/media/file1.mp3 - in this case, I just want to serve the file and let the browser play it.
/media/download/file1.mp3 - in this case, I want the user to easily upload the file.
I was able to accomplish this with mod_rewrite and php (using the header () and readfile () function), but I would rather do it all with mod_rewrite, mod_header, etc., if possible.
source
share