Welcome to WebmasterWorld Guest from 54.221.87.97

Forum Moderators: buckworks & webwork

Message Too Old, No Replies

How to redirect one domain to another domains homepage

     

dailypress

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

WebmasterWorld Senior Member 5+ Year Member



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

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

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

WebmasterWorld Senior Member 5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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]


...
 

Featured Threads

Hot Threads This Week

Hot Threads This Month