【发布时间】:2013-11-07 20:43:51
【问题描述】:
我知道在您自己的域之外的每个站点上防止热链接的 htaccess 方法,但如果可能的话,我需要更高级的东西
我想允许访问我的个人服务器和所有其他网站,但要指出一些选定的网站并禁止它们进行盗链
我非常想允许所有并拒绝特定的 IP 或 URL
允许: mywebdomain.com allothersites.com
预防: donotallowthissite.com donotallowthissite2.com
这可能吗,如果可以,你能分享一下如何实现吗?
我目前正在使用它来允许将我的所有文件热链接到具有多个服务器的第 3 方服务器,但它太混乱了,无法继续向每个站点添加新服务器和直接 ID,所以我想允许 ALL 热链接我的服务器,但是当我发现有人对我的资料进行版权保护时,我想专门阻止该网站和 id
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?nitrografixx.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?www(2|32|26|3|29|7|5).myfantasyleague.com.+(15982|21316|51396|47164|64314|43757|43757|63884|72807|54905)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?www(2|32|26|3|29|7|5).myfantasyleague.com.+(15982|21316|51396|47164|64314|43757|43757|63884|72807|54905).+$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?football(2|32|26|3|29|7|5).myfantasyleague.com.+(15982|21316|51396|47164|64314|43757|43757|63884|72807|54905)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?football(2|32|26|3|29|7|5).myfantasyleague.com.+(15982|21316|51396|47164|64314|43757|43757|63884|72807|54905).+$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?football.+.myfantasyleague.com.+(mb|site_news|choose_schedule) [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?football.+.myfantasyleague.com.+(h2h|seed_playoff_teams|playoff_schedule_setup|general_playoff_setup|transaction_setup|randomize_schedule|set_draft_order|change_draft_pick|adjust|delete_adjustments|new_predraft|calculate|waivers|rearrange_schedule|accounting|delete_transactions|trades|history|save_award|delete_accounting|submit_lineups|franchise_setup|options|message|custom_waiver_order|commish_email_setup|invite_franchise_owners|league_calendar_setup|fee_setup|standings_setup|division_conference_setup|select_packaged_waiver_rules)$ [NC]
RewriteRule \.(jpg|jpeg|png|gif|js|css)$ - [NC,F,L]
【问题讨论】:
-
是的,有可能。如果您可以更新您的问题以显示您正在尝试但不起作用的内容,我可能会提供帮助。
-
我还没有尝试过任何东西,因为我到处搜索,似乎找不到解决方案,只有允许特定网站热链接的方法,但没有什么可以阻止特定网站这样做跨度>
标签: .htaccess