Forum Moderators: phranque
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.
Thanks again.
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]
#
# 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]
Jim
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?
Jim