Apache https阻止图像热链接并允许来自https

Apache https阻止图像热链接并允许来自https,apache,mod-rewrite,https,virtualhost,Apache,Mod Rewrite,Https,Virtualhost,我在Apache 2.2.15/CentOS 6.9中有这个virtualhost设置 <VirtualHost *:80> DocumentRoot /gallery ServerName image.example.com </VirtualHost> 但问题是,如果我从访问该网站,我可以看到预期的图像,但其他网站拒绝。但当我从中访问它时,访问也被拒绝 我需要从中访问。我一直在寻找答案,但还没有找到 任何帮助都将不胜感激 RewriteEngine

我在Apache 2.2.15/CentOS 6.9中有这个virtualhost设置

<VirtualHost *:80>
    DocumentRoot /gallery
    ServerName image.example.com
</VirtualHost>
但问题是,如果我从访问该网站,我可以看到预期的图像,但其他网站拒绝。但当我从中访问它时,访问也被拒绝

我需要从中访问。我一直在寻找答案,但还没有找到

任何帮助都将不胜感激

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?example\.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?example\.com.*$ [NC]
RewriteRule \.(jpe?g?|png|gif|ico|pdf|flv|swf|gz)$ - [F]