我需要mod_headers
根据GET参数强制下载文件。上述mod_headers模块不加载,尽管它在httpd.conf中启用
<FilesMatch "*.gif">
<If "%{QUERY_STRING} =~ /dl/">
#Download header
Header set Content-Disposition "attachment"
</If>
</FilesMatch>
代码会产生错误500。不过,如果我在<IfModule>
妥善包装它,它根本不会做任何事情:
<IfModule mod_headers>
<FilesMatch "*.gif">
<If "%{QUERY_STRING} =~ /dl/">
Header set Content-Disposition "attachment"
</If>
</FilesMatch>
</IfModule>
这让我觉得,mod_headers
没有在加载所有。但我有它在httpd.conf
启用:
...
的LoadModule filter_module模块/ mod_filter.so
的LoadModule headers_module模块/ mod_headers.so
#
的LoadModule heartbeat_module模块/ mod_heartbeat.so
。 ..
是否有任何调试日志找出哪些mods已被加载,哪些不是?