Forum Moderators: phranque

Message Too Old, No Replies

manage multiple .tlds

         

sandyk20

7:24 am on Mar 9, 2006 (gmt 0)



Hi,
my main site is running on www.mydomain.in
I have following tlds as well
mydomain.co.in
mydomain.com
mydomain.net
mydomain.info
mydomain.biz

What should i do with these additional TLDs?
Can you recommend me a proper way of re-directing mydomain.com to mydomain.in?

Thanks in advance.

FrankTheDane

11:42 am on Mar 9, 2006 (gmt 0)

10+ Year Member



In Apaches httpd.conf you could put something like this

<VirtualHost *>
ServerName mydomain.in
ServerAlias www.mydomain.in
ServerAlias mydomain.co.in
ServerAlias mydomain.net
ServerAlias mydomain.info
ServerAlias mydomain.com
ServerAlias mydomain.biz
.
.
.
</VirtualHost>

FrankTheDane

11:47 am on Mar 9, 2006 (gmt 0)

10+ Year Member



Oh sorry I didnt read the redirecting part

what you might need is this in your .htaccess file in /


RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.com.*$
RewriteRule (.*) http://mydomain.in%{REQUEST_URI} [R,L]

jdMorgan

9:33 pm on Mar 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use a 301 permanent redirect, not the default 302!

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.com
RewriteRule ^/(.*) http://mydomain.in/$1 [R=301,L]

(Code for use in httpd.conf; Remove leading slash from rule pattern for .htaccess use)

Jim