Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-17-2012, 07:06 AM   #1
sponsorpimp
Confirmed User
 
sponsorpimp's Avatar
 
Industry Role:
Join Date: Apr 2008
Posts: 1,567
htaccess redirect rule help needed.

I want to redirect GB visitors to a diffrent URL by using htaccess I have tried the code below with no luck at all can anyone help!

RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^GB$
RewriteRule ^(.*)$ http://gb.example.com$1 [L]



Thanks
__________________
sponsorpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 07:12 AM   #2
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
the code should do just make sure you have mod_geoip installed
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 07:37 AM   #3
sponsorpimp
Confirmed User
 
sponsorpimp's Avatar
 
Industry Role:
Join Date: Apr 2008
Posts: 1,567
Is there a simple way of doing this for affiliates? like some simple code they can put on the home page to redirect traffic from the UK to another site?

I need it as simple as possible for affiliates to get around without having to install anything on the server.
__________________
sponsorpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 07:52 AM   #4
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
you can also redirect by browser language... it's not 100 % accurate however...

google how to do it ;-)

oh wait, i have one url for you ;]
http://www.htaccesstools.com/redirection-by-language/
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 08:09 AM   #5
sponsorpimp
Confirmed User
 
sponsorpimp's Avatar
 
Industry Role:
Join Date: Apr 2008
Posts: 1,567
Quote:
Originally Posted by klinton View Post
you can also redirect by browser language... it's not 100 % accurate however...

google how to do it ;-)

oh wait, i have one url for you ;]
http://www.htaccesstools.com/redirection-by-language/
Thanks for the info but not quite what I am looking for as it must redirect only UK visitors which is English so it would redirect all English counties and not just the UK (GB)

Like the site though...
__________________
sponsorpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 08:27 AM   #6
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by sponsorpimp View Post
Is there a simple way of doing this for affiliates? like some simple code they can put on the home page to redirect traffic from the UK to another site?

I need it as simple as possible for affiliates to get around without having to install anything on the server.
No. They could redirect based on remote_host if their server has reverse resolution on, but it shouldn't be on. It's very resource intensive.
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 08:46 AM   #7
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
Quote:
Originally Posted by sponsorpimp View Post
Thanks for the info but not quite what I am looking for as it must redirect only UK visitors which is English so it would redirect all English counties and not just the UK (GB)

Like the site though...
for uk english it should be: en-gb code....
for australia it is: en-au, for usa it is en-us..... and so on....
however, like I told, it's not 100 % accurate, so I think your only other way is only by using geo IP redirect...
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 08:59 AM   #8
Nasty
Confirmed User
 
Nasty's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: Sunny Fucking California
Posts: 1,575
Quote:
Originally Posted by sponsorpimp View Post
I want to redirect GB visitors to a diffrent URL by using htaccess I have tried the code below with no luck at all can anyone help!

RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^GB$
RewriteRule ^(.*)$ http://gb.example.com$1 [L]

Thanks
heres mine

Code:
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CN|HK|TW)$
RewriteRule ^(.*)$ http://someothersite.com/$1 [L]
__________________

“Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. If we continue to develop our technology without wisdom or prudence, our servant may prove to be our executioner.” ― Omar Bradley (1948)
Nasty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 10:19 AM   #9
sponsorpimp
Confirmed User
 
sponsorpimp's Avatar
 
Industry Role:
Join Date: Apr 2008
Posts: 1,567
Thanks for the answers, anyone else?
__________________
sponsorpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 11:04 AM   #10
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,362
you want what nasty has, unless you want to do it via php code
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-17-2012, 12:26 PM   #11
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by klinton View Post
for uk english it should be: en-gb code....
for australia it is: en-au, for usa it is en-us..... and so on....
however, like I told, it's not 100 % accurate, so I think your only other way is only by using geo IP redirect...
Also geo isn't anything like 100% accurate, as the main geo ip company, Maxmind, clearly states.
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.