我有这在我的htaccess的文件,以强制链接的文件下载,而不是开在浏览器中的规则:
I've got this this rule in my htaccess file to force linked files to download rather than open in the browser:
<FilesMatch ".(gif|jpe?g|png)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
有没有办法改变正则表达式,因此仅适用于文件中的某个目录?
Is there a way to alter the RegExp so it only applies to files in a certain directory?
感谢
您可能需要把指令中的.htaccess文件中的特定目录。
You will probably need to put the directives in the .htaccess file in the particular directory.