Forum Moderators: phranque

Message Too Old, No Replies

Redirect to a subdomain

Users from one country

         

ideavirus

6:21 am on Jun 7, 2005 (gmt 0)

10+ Year Member



Hi,

I want to re-direct every user that visits my site .... [companynamezero.com...] from India to a subdomain called [in.companynamezero.com...] .

How can i technically achieve this?

Any help appreciated.

Cheers

Dave_A

11:00 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



A html redirect command should do it, you can give the redirect a time of about five seconds before it redirects visitors.
Some search engine web spiders don't like redirects so you may have to get search engines to use the second domain and get them sent there directly by any search engine.

Hope this helps

Dave A

ideavirus

10:40 am on Jun 8, 2005 (gmt 0)

10+ Year Member



Thank you Dave.

Actually I still want all international visitors ( other than Indian visitors ) to go to [companynamezero.com...] when they type in that domain name.

ONLY all the Indian visitors should visit [in.companynamezero.com...] when they type [companynamezero.com...] which will have relevant content for Indian customers.

How will I get the re-direct detect that the user/Visitor is from India? And how accurate can i get here.

Thanks for any help here.

irishaff

3:26 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



Hi,

Yes you can do this , it will usually mean installing some software on your server to facilitate Geographical IP targeting. A good ASP programme that is use is called Activetarget ..all one word..

You can then set up a script setting conditioinal resposne along the lines of ..if visitor is from India then repsonse.redirect and specify your new domain.

If you decide to use that particular software sticky me and ill send you the code you need to customize.

David

hanuman

5:50 am on Jun 10, 2005 (gmt 0)

10+ Year Member



get geoip free country service from maxming. than add the following to your .htaccess

RewriteEngine on
GeoIPEnable On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IN$
RewriteRule ^(.*)$ [in.companynamezero.com...] [L]

<edit>

this will work only if you create a virtual domain pointing to the same directory on your server

ideavirus

8:41 am on Jun 10, 2005 (gmt 0)

10+ Year Member



Hi hanuman,

Thank you for the help.

this will work only if you create a virtual domain pointing to the same directory on your server

Could you please elaborate more on this. My web hosting account will be using cpanel and I will create a sub-domain there which says [in.companynamezero.com...] . how do I create a virtual domain and point it to the same directory?

Thank you for the help again
Cheers

hanuman

12:39 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



you should be able to do it through the cpanel - choose Addon Domain Maintenance