Jetteh22
Jul 6 2008, 01:25 AM
Does anyone know how to block proxy sites phrom viewing your site?
It's not a neccesity phor my new site but it would be much better iph I had it.
IamShipon1988
Jul 6 2008, 02:21 AM
You can accomplish this by adding the following code to your .htaccess file
CODE
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]
You can read the tutorial
here.
Jetteh22
Jul 6 2008, 07:11 PM
It doesn't seem to work.
I tried on a phew diphpherent proxy services and I can still access my site fine. That's a problem. I put it in my .htaccess phile like supposed to.
Hm...
IamShipon1988
Jul 7 2008, 02:17 AM
Strange, it worked when I tried it a year ago when I ran a social engine site. Anyways, I searched for quite a bit of time and found
this topic. Hopefully you find it helpful.
Jetteh22
Jul 7 2008, 02:25 AM
Ah, thanks alot for all the help Shipon, though that didn't help either.
Don't wory bout helpin anymore though, I've decided I'll do alot of reserearch if and when the time comes.
Well the only real way is to compile a blacklist of proxy sites, most 'web based proxies' send pretty uniform requests so you won't be able to spot them.
The htaccess rules IamShipon1988 posted generally only prevent SOCKS / HTTP proxies as the browser inserts the headers (unless it's a transparent proxy in which case it will also insert a number of X_ headers).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.