GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 19-Mar-2005, 14:38
tim9021 tim9021 is offline
New Member
 
Join Date: Mar 2005
Posts: 2
tim9021 is on a distinguished road

htaccess: deny by http_user_agent


Will this code block traffic with 'Fetch API Request' in http_user_agent?

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Fetch\ API\ Request
RewriteRule .* - [F,L]

Thanks for your help.
  #2  
Old 21-Mar-2005, 02:08
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
I've seen some code that might work better

Code:
SetEnvIf User-Agent "Fetch\ API\ Request$" badrobot <Directory /> order deny,allow deny from env=badrobot </Directory>
I haven't tested this code, but it looks like it will actually work just fine
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 21-Mar-2005, 08:28
tim9021 tim9021 is offline
New Member
 
Join Date: Mar 2005
Posts: 2
tim9021 is on a distinguished road
Quote:
Originally Posted by Allowee
I've seen some code that might work better

Code:
SetEnvIf User-Agent "Fetch\ API\ Request$" badrobot <Directory /> order deny,allow deny from env=badrobot </Directory>
I haven't tested this code, but it looks like it will actually work just fine
***
Thanks, I'll try it out.
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Denying directory listing and htaccess question meet_raman Apache Web Server Forum 11 01-Jul-2004 11:20
bypass htaccess fraggle two Apache Web Server Forum 3 11-Nov-2003 04:56

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:55.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.