homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Domain Names
Forum Library, Charter, Moderators: buckworks & webwork

Domain Names Forum

    
How to redirect one domain to another domains homepage
dailypress




msg:4275988
 5:07 pm on Mar 3, 2011 (gmt 0)

hi all,

I am trying to redirect one of my old domains to a new domain names homepage however when I use htaccess 301 redirect, the OldDomain.com/Folder redirects to NewDomains.com/Folder
That is not what I want.

I am trying to redirect all URLS from OldDomain to the NewDomain.com/index.html front page.

Any suggestions?

 

HuskyPup




msg:4276201
 9:12 pm on Mar 3, 2011 (gmt 0)

Depends who your registrar is. To do it easily you would just url-forward to where you want it to go:

NewDomain.com/index.html front page


Nope...newdomain.com/ is better.

Are the domains hosted on a CPanel? If so you can re-direct from there.

dailypress




msg:4276236
 10:22 pm on Mar 3, 2011 (gmt 0)

thanks HP,

For some reason the traffic was redirecting to NewDomain.com/FolderName although the NewSite did not have folder names. So I ended up creating several 301 redirect .PHP files to redirect the traffic I receive for OldDomain.com/FolderNames/index.php to my NewSite.com.

Thanks,
DP

dailypress




msg:4276539
 1:01 pm on Mar 4, 2011 (gmt 0)

basically the domain forwarding would redirect subfolder URL's to the new domain subfolders although I simply wanted all of the links to point to the new sites homepage.

htaccess didnt do the trick either. Im sure there was a better way rather than manually uploading redirect files into each folder and category.

Samizdata




msg:4276564
 2:00 pm on Mar 4, 2011 (gmt 0)

Untested, but something like this in .htaccess should do it:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/ [R=301,L]


...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Domain Names
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