htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Can I allow a specific domain from being blocked?
PostPosted: 18 Jul 2008 08:17 
Offline

Joined: 18 Jul 2008 08:14
Posts: 3
To block hackers that are often behind a proxy, I have added this to my .htaccess:

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:XROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^.* - [F]

Unfortunately, one member can“t access the site from her job at a govermental organization. I suggested that she try to access the site through a web proxy, like http://www.the-cloak.com/ . But she are not allowed to access these type of sites either at her job. Is it possible to allow her domain or ip-range in .htaccess, so she can access my site? Can she do anything herself to be able to access the site?


Top
 Profile  
 
 Post subject: Re: Can I allow a specific domain from being blocked?
PostPosted: 04 Aug 2008 08:20 
Offline

Joined: 18 Jul 2008 08:14
Posts: 3
I have Googled and found this suggestion to unblock a certain domain, although it seems not to be tested:

RewriteCond %{HTTP_REFERER} !.*allowedproxydomain.com.*

Will it work?


Top
 Profile  
 
 Post subject: Re: Can I allow a specific domain from being blocked?
PostPosted: 07 Aug 2008 05:34 
Offline

Joined: 18 Jul 2008 08:14
Posts: 3
It did not work and I tried this:

RewriteCond %{HTTP_REFERER} !.*www.site.com.*
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:XROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule .* - [F]

I also tried this line with the same result:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?site\.com

http://www.site.com was the domain name I wanted to allow to my site


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 9 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

Search for:
Powered by phpBB