i published mirror script so i must publish this too
PHP Code:
RewriteEngine on
#Only HL2/Valve servers
RewriteCond %{HTTP_REFERER} ^hl2://(.*) [NC]
#Allowed servers
RewriteCond %{HTTP_REFERER} !^hl2://91\.91\.91\.91:27015 [NC]
RewriteCond %{HTTP_REFERER} !^hl2://91\.204\.162\.240:(.*) [NC]
#if not allowed, send 403 Forbidden
RewriteRule .* - [F]
this is example of .htaccess mod_rewrite rule that block requests from servers not defined in this file. This blocks only another servers. Browser or other things will stil be able to download files.
This example allow donwload files for clients on servers: 91.91.91.91 port 27015 and 91.204.162.240 on any port
You can test this with FireFox and RefControl Addon. Exactly same file is on
http://fastdownload.strefa-source.pl try to reach this site using referer hl2://91.91.91.91:27015 and some other hl2://
__________________