Current time: 10-22-2019, 06:25 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
htaccess help please
06-16-2013, 07:45 AM
Post: #1
htaccess help please
hi everyone

i wonder if you can help me by setting a rule for each ip from a certain country can be redirected to some sort another sub-domain or a link , anyone can help me please ?
Find all posts by this user
Quote this message in a reply
06-17-2013, 04:02 PM
Post: #2
RE: htaccess help please
Look at mod_geoip2. This makes the country of origin available as GEOIP_COUNTRY_CODE - you can build your rules from that.
Find all posts by this user
Quote this message in a reply
06-26-2013, 05:37 PM
Post: #3
RE: htaccess help please
you will need geoip you can find such ip database on you can get it from http://www.ipaddresslocation.org/ip_rang...ranges.php
then you have to setup ur .htaccess to redirect in ip case
# permanently redirect specific IP request for entire site
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 22\.22\.22
RewriteRule \.php$ http://subdomain.YOURDOMAINHERE.COM/ [R=301,L]
but in experience it will cost you hard server load i think better to do it in php
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)