.htaccess Block Proxy

Started on the old forum in November 2008 · view the original in the archive · old links redirect here

3 replies · 2,754 views · started 18 years ago · 1 min read

2 participants
Guest #1

im use this for block proxy sever access my wap...

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]

this is not operation who can help me?

something else Fellow · 2,296 posts #2

it wont protect against all proxy servers just the majority of them 😛 proxies using unlisted methods above will not be blocked. This just saves having to write out millions of proxy servers int your .htaccess 🙂

something else Fellow · 2,296 posts #3

RewriteCond %{HTTP:FORWARDED} !^$ [OR] will ban most mobiles aswell lol

ogah Junior · 17 posts #4

something else wrote: RewriteCond %{HTTP:FORWARDED} !^$ [OR] will ban most mobiles aswell lol right, blocking VIA, FORWARDED and X_FORWARDED_FOR is bad idea. not only ban mobile users, PC user maybe also blocked. some ISP have set of VIA or X_FORWARDED_FOR

but that is your choice, you may ban VIA and X_FORWARDED_FOR, and you will lose some visitors 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close