We are using a PHP scripting for tunnelling file downloads, since we don\'t want to expose the absolute path of downloadable file:
header(\"Content-Type: $ct
A really nice way to solve this without having to "roll your own" PHP code is to use the mod_xsendfile Apache module. Then in PHP, you just set the appropriate headers. Apache gets to do its thing.
header("X-Sendfile: /path/to/file");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; file=\"filename\"");