PDA

View Full Version : .htaccess expert wanted


Geezer
01-04-08, 06:12 PM
Well when I say wanted I don't mean to hire I mean to help me sort out this Geo Redirect bollocks. I have tried adding the following:

RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MX$ [NC]
RewriteRule ^(.*)$ http://myredirection.url [R,L]

But its doesn't work, I also read about a GEOIP Module that must be installed, is this correct?

I spoke to one of my hosts and they said it should work but does it bollocks.

If anyone knows how to set up Geo Redirect through .htaccess can you let me know how. I want to just redirect by country not IP :)

Damian
01-04-08, 06:16 PM
AFAIK yes, you must have the geo-ip module installed.

This threa (http://forums.digitalpoint.com/showthread.php?t=153845)d has some links to some.

Geezer
01-04-08, 06:20 PM
AFAIK yes, you must have the geo-ip module installed.

This threa (http://forums.digitalpoint.com/showthread.php?t=153845)d has some links to some.


Yeah cheers, I've seen that, in fact I've probably seen every single bastard thing written about it today :geezer:

If anyone knows of anything else I can do to geo redirect then let me know :alc:

I have seen one script and it looks good but it just seems a bit over complicated for what I want, I bet I end up getting it :(

TGITC
01-04-08, 06:22 PM
Yeah looks likea geoip mod is needed...

THIS (http://www.articlesuniverse.com/Article/Useless-Traffic---Is-there-such-a-thing---GEO-Redirecting-your-Foreign-Traffic/45258) was interesting....

Geezer
01-04-08, 06:28 PM
Yeah looks likea geoip mod is needed...

THIS (http://www.articlesuniverse.com/Article/Useless-Traffic---Is-there-such-a-thing---GEO-Redirecting-your-Foreign-Traffic/45258) was interesting....

Yep read that one as well :)

Cardinal_Sin
01-04-08, 07:14 PM
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^83.20.92.41$
RewriteCond %{REMOTE_HOST} ^.*\.cn$ [OR]
RewriteCond %{HTTP:Accept-Language} ^cn.*$
RewriteRule .* http://www.send-them-here.com/index.htm [R]


Something like this will kick them off


edit -
RewriteCond %{REMOTE_ADDR} !^83.20.92.41$ - this line isn't needed unless you are re-directing surfers from your own country and need access yourself (the ip would be your ip)

Geezer
01-04-08, 07:49 PM
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^83.20.92.41$
RewriteCond %{REMOTE_HOST} ^.*\.cn$ [OR]
RewriteCond %{HTTP:Accept-Language} ^cn.*$
RewriteRule .* http://www.send-them-here.com/index.htm [R]


Something like this will kick them off


edit -
RewriteCond %{REMOTE_ADDR} !^83.20.92.41$ - this line isn't needed unless you are re-directing surfers from your own country and need access yourself (the ip would be your ip)

Cheers bobby big bollocks but I have it all sorted now. I got a neat little script from a neat little member off here ;)

Cardinal_Sin
01-04-08, 07:54 PM
Cheers bobby big bollocks but I have it all sorted now. I got a neat little script from a neat little member off here ;)
Which script?

Geezer
01-04-08, 08:04 PM
Which script?

I got the script from kaktusan, he is very good. I had a custom script written by him last year as well, very good and I'm always glad to recommend him. He is the man behind such greats as Site Organizer and Blogs Organizer.

His site is here: http://www.cheapestadultscripts.com/ and is well worth making a note of ;)

Cardinal_Sin
01-04-08, 08:10 PM
I got the script from kaktusan, he is very good. I had a custom script written by him last year as well, very good and I'm always glad to recommend him. He is the man behind such greats as Site Organizer and Blogs Organizer.

His site is here: http://www.cheapestadultscripts.com/ and is well worth making a note of ;)

Right - Yes, know the site - Rebel uses the scripts for the members blog stuff - She sent me there to get what she needed.

Geezer
01-04-08, 08:32 PM
Right - Yes, know the site - Rebel uses the scripts for the members blog stuff - She sent me there to get what she needed.

Yeah he is good, I should have contacted him at 11:30 this morning and save myself some agg :geezer: