Using .htaccess to direct traffic based on IPs

Hi there

Ages ago I came across a forum post where someone said they were directing traffic based on a users IP, which in turn allowed them to direct based on a users country. This is all fine, but they said they were doing it via .htaccess

I have never come across doing it via .htaccess, but would very much like to learn how now because I have a need for it on one of my websites.

If you have any idea on how to do this I would be appreciative. I have all the country IP's etc, I am only looking for technical info on how to implement it via .htaccess

Thanks!

 

 

 

 

Top