Forum Moderators: phranque

Message Too Old, No Replies

Redirect all countries to other domain exept mine

.htaccess or anything else

         

bakoline

11:55 am on May 24, 2010 (gmt 0)

10+ Year Member



Hello everyone, I learned a lot from this forum, but I couldn't find this issue.

I have a site www.domain.com and I want to redirect all the other countries IP a adresses to www.domain1.com

I found code for blocking all countries IP's exept my country, but I need to redirect them...

this is the example code:

<Limit GET HEAD POST>
order deny,allow
# Country: GEORGIA
# ISO Code: GE
# Total Networks: 59
# Total Subnets: 730,112
allow from 62.32.35.128/25
allow from 62.32.36.0/22
allow from 62.32.40.0/22
allow from 62.32.44.0/24
#
deny from all
</Limit>

g1smd

12:06 pm on May 24, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You'd use a
RewriteRule
with the
[R=301,L]
flags, and a preceding
RewriteCond
testing the
REMOTE_ADDR
value(s).

[edited by: jdMorgan at 1:29 pm (utc) on May 24, 2010]
[edit reason] tidied [/edit]