Welcome to WebmasterWorld Guest from 54.196.208.6

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess mod_rewrite

Changing the URL of the domains to one specific

     
2:02 pm on Apr 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1022
votes: 0


Hi all,

Sorry if this has been discussed to death, but I honestly can't find anything that directly helps with what I am trying to do, therefore any help is appreciated.

I have multiple domains pointed at my website all related in a sense to the particular industry my site is aimed at!
But after reading many topics here about how google can penalize for this, I have decided to create an .htaccess for the root of my server that redirects all the domains to only one!
i.e. domain1.com domain2.com domain3.com are shown in the address bar of the browser, how can I do a redirect so that every domain redirects and shows domain1.com in the address bar?

Many thanks and kind regards,

-gs

2:08 pm on Apr 17, 2003 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 0


This is a good place to start
An Introduction to Redirecting URLs on an Apache Server [webmasterworld.com]
3:30 pm on Apr 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1022
votes: 0


Hi all,

Right this is what i have came up with but still no joy as it keeps the requesting domain in the address bar!

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain2\.info
RewriteRule ^(.*)$ [domain1.net$0...] [R=301]

Any thoughts?

-gs

4:21 pm on Apr 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Alternative_Future,

Try this thread [webmasterworld.com].

Jim

5:52 pm on Apr 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1022
votes: 0


Many thanks Jim,

That did the trick! I thought i had checked all the resources on WebmasterWorld :(

-gs