Direct web country traffic - how to.
I want to direct all traffic from a specific country to an opt-in page.
I read about a .htaccess file one can create to block an IP so maybe my answer lies in .htaccess?
---
order allow,deny
deny from 000.00.0.0
allow from all
---
Someone else also mentioned this :
Search the IP range that you want to redirect, than make an htacess file with the following syntax:
RewriteCond %{REMOTE_ADDR} ^64\.126\.81\.30$ [OR]
RewriteCond %{REMOTE_ADDR} ^75\.117\.244\.27$
RewriteRule .* http://www.mysite.com/europe.htm [R,L]
(edit the ranges and the site/page and do not add the [OR] on the last line of IPs)
---
Now I can go here and get all the IP addresses for a country (there's quite a few) IP Range - Ip Address Range Lookup - Ip Range Finder but I'm not sure how to implement this in an .htaccess file.
Must I include this in the htaccess file - deny from xxx - and then list all the IPs that the url I just mentioned shows.
Please help, thanks a lot.
:)