添加了允许列表内的域名才可以使用站点资源。

 

<Directory "/wwwroot/mysite">
    SetOutputFilter DEFLATE
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    DirectoryIndex index.html index.php
	Header set Access-Control-Allow-Origin "*"
	SetEnvIfNoCase Referer "^$" local_ref
	SetEnvIfNoCase Referer "mysite.com/.*$" local_ref
	SetEnvIfNoCase Referer "www.mysite.com/.*$" local_ref
    SetEnvIfNoCase Referer "yoursite.com/.*$" local_ref
	<filesmatch "\.(mp3|jpeg|pdf|png|jpg|gif)">
        Require all denied
        Require env local_ref
    </filesmatch>
</Directory>