homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

.htaccess mod_rewrite
Changing the URL of the domains to one specific
Alternative Future

 2:02 pm on Apr 17, 2003 (gmt 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,




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

This is a good place to start
An Introduction to Redirecting URLs on an Apache Server [webmasterworld.com]

Alternative Future

 3:30 pm on Apr 17, 2003 (gmt 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?



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


Try this thread [webmasterworld.com].


Alternative Future

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

Many thanks Jim,

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


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved