Forum Moderators: phranque

Message Too Old, No Replies

a .htacces to block dls only from my games server

         

sabongio

7:42 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



hi , ok i play a game called counter-strike you may have heard of it. I have a .htaccess file that blocks all dls from my website except for to the game server i play in which downloads are redirecting there so here it goes

i put the htaccess on my server and its been doing its job but i get these errors in my webserver log

[Mon Jun 13 10:57:07 2005] [error] [client 65.182.253.204] client denied by server configuration: /usr/www/usr/server/maps/tower-wars3_s.bsp.bz2

and i just tried connecting to my server and it denied my download and gave me map missin error.

my .htaccess file looked like this
SetEnvIfNoCase Referer ^hl2://66\.150\.188\.42 allow_download
Order Deny,Allow
Allow from env=allow_download
Deny from all

-thanks

jdMorgan

10:59 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Direct type-in requests and caching proxy connections (A la AOL) won't provide a referrer (it will be blank.) So how do you want to handle those requests? Access control based on HTTP_REFERER is simple, but unreliable, and this is a good example of the problem: Sometimes the client doesn't send a referrer. That doesn't mean it's a bad guy, and most often the visitor isn't even aware of this issue, so you should allow access. But that does open a hole in your protection. If you cannot live with a non-100% solution, look into more sophisticated cookies-based or file-renaming based solutions.

Jim