Forum Moderators: phranque

Message Too Old, No Replies

Multiple Domains Setup

How to setup multiple tlds .com, org, .net to one country specific tld?

         

sandyk20

11:57 pm on Apr 12, 2006 (gmt 0)



hi,
I have an active portal running on country specific TLD www.mydomain.in running on a static ip adress.
I do have other sub-domains like
1.mydomain.in
2.mydomain.in

I own all the other tlds like
www.mydomain.co.in
www.mydomain.com
www.mydomain.net
www.mydomain.org
www.mydomain.info
www.mydomain.biz
www.my-domain.com
www.my-domain.net
etc. etc.

1.
How can I setup a re-direction of all the domain names .com, .net, org and others to my active/live domain name www.mydomain.in

2.
Should i also setup re-direction for sub-domains?
i.e., create 1.mydomain.com and 2.mydomain.com?

Please help me setup the re-direction properly so that it wont hurt my Search engine rankings.
I dont have problems chanding httpd.conf or acheive this with .htaccess

thanks in advance.

sandyk20

1:38 am on Apr 14, 2006 (gmt 0)



still looking for help, i checked old threads but was unable to implement the solution for my question above.

Thanks again.

sandyk20

11:49 pm on Apr 19, 2006 (gmt 0)



I have got other tlds www.mydomain.com and www.mydomain.net which needs to be re-directed 301/permanent way to www.mydomain.in

Re-direct www.mydomain.in/forum or forum.mydomain.in to forums.mydomain.in
Re-direct www.mydomain.com/forums or forums.mydomain.com to forums.mydomain.in
Re-direct www.mydomain.com/forum or forum.mydomain.com to forums.mydomain.in
Re-direct www.mydomain.com/gallery or gallery.mydomain.com to gallery.mydomain.in
Re-direct www.mydomain.net/forums or forums.mydomain.net to forums.mydomain.in
Re-direct www.mydomain.net/forum or forum.mydomain.net to forums.mydomain.in
Re-direct www.mydomain.net/gallery or gallery.mydomain.net to gallery.mydomain.in

Please let me know the best possible way to do above changes.

This is my .htaccess file in /public_html/ folder
#
Options +Indexes +FollowSymlinks
RewriteEngine on
RewriteBase /
#
# Prevent duplicate content on gallery and forums subdomain
RewriteCond %{HTTP_HOST} ^(gallery¦forums)\.mydomain.in
RewriteRule ^(gallery¦forums)(.*)$ [%{HTTP_HOST}$1...] [R=301,L]
#
#Re-Direct users coming to forums and gallery via IP Address in SERPs index to proper location
RewriteCond %{HTTP_HOST} ^000\.00\.000\.000
RewriteRule ^(gallery¦forums)/(.*)$ [$1.mydomain.in...] [R=301,L]
#
#Re-Direct users coming to Site via IP Adress to proper location
RewriteCond %{HTTP_HOST} ^(000\.00\.000\.000¦mydomain\.in)
RewriteRule (.*) [mydomain.in...] [R=301,L]
#

jdMorgan

12:29 am on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks like the only change needed would be to add a rule and modify your existing first rule:

# Redirect subdirectory request to subdomain
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.(in¦com¦net)
RewriteRule ^(gallery¦forums)(.*)$ http://$1.mydomain.in$2 [R=301,L]
#
# Prevent duplicate content on gallery and forums subdomain
RewriteCond %{HTTP_HOST} ^(gallery¦forums)\.mydomain\.(in¦com¦net)
RewriteRule ^(gallery¦forums)(.*)$ http://%1.mydomain.in$2 [R=301,L]

Change the broken pipe "¦" character to a solid pipe before use; Posting on this board modifies the pipe character.

Jim

sandyk20

1:53 am on Apr 20, 2006 (gmt 0)



Hello Jim,
Thank You for your time again.
After modifying .htaccess code according to your suggestion this were some problems:

1.
Sub-domains stopped working. I did a server header check for forums.mydomain.in which gave following results:

HTTP/1.1 301 Moved Permanently
Location: [forums.mydomain.in...]
Connection: close

2.
www.mydomain.com/forums/ was re-directing properly to forums.mydomain.com
but
mydomain.com/forums/ was re-directed to www.mydomain.in/forums/

3.
www.mydomain.com and mydomain.com were showing following results on server header check (was not re-directing):
HTTP/1.1 200 OK

I have switched to original code posted in message no 3. looking for further suggestions?

Regards,

Another Question:
As posted above I have a static IP setup for mydomain.in how should I setup mydomain.net and mydomain.com on my server?
Setup them as parked/addon domains in WHM/Cpanel?

jdMorgan

2:45 am on Apr 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, I'm sorry, I don't see the problem. I'm afraid you'll need to study the code and Apache mod_rewrite documentation [httpd.apache.org], modify the code, and experiment with it until you get it working.

Jim