htaccess for spammers

  • constrych9
  • Born
  • Born
  • constrych9
  • Posts: 1

Post 3+ Months Ago

I have a htaccess file that I have created to try and block http proxies. I used the following code:

APACHE Code: [ Select ]
RewriteEngine on
RewriteCond %{HTTP:VIA}                 !^$ [OR]
RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
RewriteRule ^(.*)$ - [F]
  1. RewriteEngine on
  2. RewriteCond %{HTTP:VIA}                 !^$ [OR]
  3. RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
  4. RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
  5. RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
  6. RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
  7. RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
  8. RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
  9. RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
  10. RewriteRule ^(.*)$ - [F]



It will block some but others are still able to get to my site. So I have 2 questions. 1. Is there a way to view the HTTP string that the htaccess is looking at so I can see what parameters the client is passing so I can edit the rewritecond. and 2. Is there a better method to block http and web proxies.

Thank you for your help.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

There are two ways to see the string you're working with. The first is to do a simple redirect that attaches that string to the querystring so you can see it. The second is more complicated but gives you a LOT more debugging information. It's called RewriteLog.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 40 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.