سلام
یک فایل به نام web.config بسازید ( اگر وجود نداره )
بعد کد زیر توش قرار بدید که میشه معادل کد .htaccess که قرار دادن
کد:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HotLink" stopProcessing="true">
<match url="\.(jpg|jpeg|png|gif)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_REFERER}" pattern="^$" ignoreCase="false" negate="true" />
<add input="{HTTP_REFERER}" pattern="^http(s)?://(www\.)?yourdomain.com" negate="true" />
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>