Ok, I've looked everywhere and I can't figure out how to do this in Litespeed.
In Apache, I can easily enable this module:
https://tn123.org/mod_xsendfile/
And have files forced to download when referenced/called via the browser's "Save As" feature.
And everywhere I look people are pointing out to this implementation in Litespeed of the same feature:
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:internal-redirect
But it's nowhere near the same, or it doesn't work the same way - it just opens up the file referenced, doesn't allow me to force "Save As" option on it.
Here is what I have in my download.php file (that worked just fine on Apache):
$file= $_GET["path"];
header("X-LiteSpeed-Location: /media/$file");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$file\"");
And the file is called with download.php?path=Filename.pdf
What am I missing?
Or what is Litespeed missing to force this as a downloadable file instead?
In Apache, I can easily enable this module:
https://tn123.org/mod_xsendfile/
And have files forced to download when referenced/called via the browser's "Save As" feature.
And everywhere I look people are pointing out to this implementation in Litespeed of the same feature:
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:internal-redirect
But it's nowhere near the same, or it doesn't work the same way - it just opens up the file referenced, doesn't allow me to force "Save As" option on it.
Here is what I have in my download.php file (that worked just fine on Apache):
$file= $_GET["path"];
header("X-LiteSpeed-Location: /media/$file");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$file\"");
And the file is called with download.php?path=Filename.pdf
What am I missing?
Or what is Litespeed missing to force this as a downloadable file instead?