从mod_qos中排除目录

时间:2015-12-14 18:53:55

标签: php download

可以从mod_qos过滤中排除目录吗?

我有一个php下载脚本,在4Mb上完成了20MB的文件下载,mod_qos阻止了这个错误消息的下载:

[error] mod_qos(034):访问被拒绝,QS_SrvMinDataRate规则( out ):min = 150,此连接= 0,c =

或者可以使用mod_rewrite排除directoru / downloads?例如,仅当URI不是/ downloads?

时才执行mod_qos规则

PHP代码:

$filename = 'test.exe';
$filepath = "downloads/";

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"".$filename."\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filepath.$filename));
set_time_limit(0);
ob_end_flush();
@readfile($filepath.$filename);

0 个答案:

没有答案