htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Blocking entire countries.
PostPosted: 24 Dec 2006 18:19 
Offline

Joined: 24 Dec 2006 18:06
Posts: 1
My hosting company referred me to this site for further guidence.
And I apologize in advance if I'm asking stupid questions or appear stupid.
Because I'll be honest...
I'm not a very smart person at all. (But I try)

I have several sites that I'm setting up.

I want to be able to block some of them from the UK and Canada.
And another one I want to block from France and Canada.

Now I've been reading the tutorials and every document I can get my hands on. But as I said before I'm kind of dumb and it takes me 5-times longer to figure things out.


This is my current .htaccess file

Code:
order allow,deny
deny from blocked IP address
deny from Bloced range of ip addresses
allow from all

Options +FollowSymlinks
RewriteEngine on
#
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://([^.]+\.)*mysite\.com [NC]
RewriteRule \.(gif¦jpe?g|png|mpe?g|wmv|avi|mov|asf|swf)$ - [NC,F]
#
RewriteCond %{HTTP_REFERER} alexa\.com [NC,OR]
RewriteCond %{HTTP_REFERER} blocked-site\.com [NC,OR]
RewriteCond %{HTTP_REFERER} blocked-site.com [NC,OR]
RewriteCond %{HTTP_REFERER} blocked-site.co.uk [NC,OR]
RewriteCond %{HTTP_REFERER} blocked-site\.co\.uk [NC]
RewriteRule .* - [G]


I've been fiddling with a ton of stuff and I'm not sure how to impliment an entire country blocking into my current file.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], MSN [Bot], MSNbot Media and 4 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