Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^hl2://*.*.*.* [NC]
RewriteRule \.(gif¦jpe?g¦png¦bz2¦bsp)$ - [F,NC,L]
Do you want to block another server from accessing your server, or do you want to block clients referred to your server from some other game server?
The former requires %{REMOTE_ADDR} or %{REMOTE_HOST}, while the latter uses %{HTTP_REFERER}.
Note that the use of %{REMOTE_HOST} requires your server to request -and wait for- a reverse-DNS lookup on the IP address. Therefore, these can slow down your server badly. If you must use %{REMOTE_HOST} lookups, be careful to limit the scope as much as possible, so that these lookups are only done when absolutely necessary.
Jim
We need to tighten up the technical terms and be very specific here, because it's still hard to tell whether another server is fetching your content, or just including it on their pages (for example as <HREF>s in <IMG> tags) so the the client browsers load it.
Jim