Hi All,
I have launched a .com website priced in € for my client, and they have asked me to setup a .co.uk (specifically for the UK market). A copy of the site was made and prices etc were all changed to £ GBP. My client has now asked me to redirect all UK users from the .com to the .co.uk.
I have been looking into this, and the solution I have come up with is to visit blockacountry.com and get the entire list (Most up to date) of UK IP Addresses.
The website give me the code for the htaccess file to block them, but I want to redirect them from .com to .co.uk so they can only buy in £ GBP
An example of the code I download from blockacountry.com is
Can anyone help me rewrite this to redirect thses IP’s instead?
I need to incorporate the above IP’s (there is many more, these are just a few) to the below code I htaccess
Or is there a better solution to having all UK clients pointed to the .co.uk website?
Also, how would I go about testing this, uk proxy maybe?
Many thanks in advance.
I have launched a .com website priced in € for my client, and they have asked me to setup a .co.uk (specifically for the UK market). A copy of the site was made and prices etc were all changed to £ GBP. My client has now asked me to redirect all UK users from the .com to the .co.uk.
I have been looking into this, and the solution I have come up with is to visit blockacountry.com and get the entire list (Most up to date) of UK IP Addresses.
The website give me the code for the htaccess file to block them, but I want to redirect them from .com to .co.uk so they can only buy in £ GBP
An example of the code I download from blockacountry.com is
Code:
deny from 217.78.144.0/20
deny from 217.79.96.0/20
deny from 217.79.112.0/20
deny from 217.79.160.0/20
deny from 217.79.192.0/20
deny from 217.79.240.0/20
deny from 217.110.0.0/15
deny from 217.112.32.0/20
I need to incorporate the above IP’s (there is many more, these are just a few) to the below code I htaccess
Code:
RewriteCond %{HTTP_HOST} ^www.my-domain.com$ [NC]
RewriteRule ^(.*)$ http:// my-domain.co.uk/$1 [R=301,L]
Also, how would I go about testing this, uk proxy maybe?
Many thanks in advance.