![]() |
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 :) |
the code should do just make sure you have mod_geoip installed
|
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. |
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/ |
Quote:
Like the site though... |
Quote:
|
Quote:
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... :) |
Quote:
Code:
RewriteEngine on |
Thanks for the answers, anyone else?
|
you want what nasty has, unless you want to do it via php code
|
Quote:
|
All times are GMT -7. The time now is 05:40 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123