允许/拒绝外部请求htaccess

时间:2010-09-17 12:13:15

标签: .htaccess

我想阻止我的用户上传的Flash / SWF来自其他域名(除非获得批准)。

我只想阻止一些我认为是恶意的域名。

1 个答案:

答案 0 :(得分:0)

# List the domains here, put [NC, OR] at the end of
# each domain rule except the last one.
RewriteCond %{HTTP_REFERER} example\.com [NC, OR]
RewriteCond %{HTTP_REFERER} example\.invalid [NC, OR]
RewriteCond %{HTTP_REFERER} example\.org
RewriteRule .*\.swf http://localhost [L,R=301]
相关问题