Urban Terror Forums: Autodownload - How to limit access by User Agent ? - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Autodownload - How to limit access by User Agent ? Rate Topic: -----

#1 User is offline   Wolfseye Icon

  •   verified user   
  • Account: wolfseye
  • Main tag: FCDE-
  • Country:
  • Joined: 01-March 10
  • Posts: 452

Post icon  Posted 23 November 2012 - 11:00 AM

Many years ago someone told me how to make sure that I could, via .htaccess, make sure that the files in my own autodownload location would be only accessible when coming from a URT Server. And not from a direct link in a Webbrowser or such. Unfortunately I don't find that anymore, and I simply forgot. Could someone maybe tell me what the exact syntax would be ?

Something with the user agent I suppose. Any help is appreciated.

Thanks.

Wolfseye

This post has been edited by Wolfseye: 23 November 2012 - 11:00 AM


#2 User is offline   surrealold2 Icon

Posted 24 November 2012 - 04:00 AM

Hi Wolfseye,

You could do this with the below in your .htaccess file, it'll require mod_rewrite to be enabled in your apache2 config however.


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^ioq3 [NC]
RewriteRule ^.* - [F,L]



#5 User is offline   surrealold2 Icon

Posted 24 November 2012 - 05:34 AM

Yeah sure, no problems here.

And I agree 100% that its not a bullet proof solution, as it could be spoofed.

bullet_loaderAdvertisement

#6 User is offline   Courgette Icon

  •   community dev   
    B3 bot developer
  • Account: courgette
  • Main tag: [B3]
  • Country:
  • Joined: 09-June 09
  • Posts: 204

Posted 24 November 2012 - 10:47 AM

when I was running the UbU server, we also had a bandwidth limitation with the apache bm_mod module. We could limit the maximum number of concurrent downloads for the maps and limit the rate of download. See http://linuxpoison.b...h-limiting.html

#7 User is offline   Wolfseye Icon

  •   verified user   
  • Account: wolfseye
  • Main tag: FCDE-
  • Country:
  • Joined: 01-March 10
  • Posts: 452

Posted 24 November 2012 - 10:56 AM

View Postsurreal, on 24 November 2012 - 04:00 AM, said:

Hi Wolfseye,

You could do this with the below in your .htaccess file, it'll require mod_rewrite to be enabled in your apache2 config however.


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^ioq3 [NC]
RewriteRule ^.* - [F,L]


Thank you very much m8, works like a charm. ;)

Cheers

Wolfseye

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942