coldbee Posted January 3, 2008 Posted January 3, 2008 I need to set up a redirection so that no matter what page someone requests on site A they go to a single page on Site B. I can't figure out how to do this with the redirect option in cpanel unless I enter the information for each page on site A. Site A is quite large so that is NOT an option. I'd appreciate any suggestions/ideas for a solution. Here is the backgroud so you will understand why I am trying to do it this way. Two companies have merged into one new company with a new website. I host (as a reseller on TCH) one of the companies sites. My client wants any requests for the old site to go to a page on the new site that explains the merger and the new website. TIA, Colby Quote
TCH-Thomas Posted January 3, 2008 Posted January 3, 2008 If I understand what you want to do correct, you would only need to go to the redirect section and choose the domain in the dropdown list, then leave the next field empty, then in the field for "redirects to" enter the other domain. Also, chose if you want the redirect to be permanent or temporary in the "Type" dropdown. Quote
coldbee Posted January 3, 2008 Author Posted January 3, 2008 If I understand what you want to do correct, you would only need to go to the redirect section and choose the domain in the dropdown list, then leave the next field empty, then in the field for "redirects to" enter the other domain. Also, chose if you want the redirect to be permanent or temporary in the "Type" dropdown. I tried that and it only works for the home page. All other pages send you to an error page. Quote
TCH-Bruce Posted January 3, 2008 Posted January 3, 2008 Add the following to your .htaccess file on the site you are redirecting. >ErrorDocument 404 http://where-ever-you-want-it-to-go That should get you what you want. Quote
Samrc Posted January 3, 2008 Posted January 3, 2008 ....hmmm thinking out loud here.... Couldn't you just park that old domain onto the new website? Quote
coldbee Posted January 3, 2008 Author Posted January 3, 2008 Add the following to your .htaccess file on the site you are redirecting. >ErrorDocument 404 http://where-ever-you-want-it-to-go That should get you what you want. Strange. Now the non-home pages aren't giving me an error page, they upload fine. I'm guessing this is why your suggestion isn't working. So now only the home page redirects (due to the cpanel redirect) and all non-home pages stay as they always were - i.e. don't go to the new site. This is very frustrating. Thanks for your help. Colby Quote
coldbee Posted January 3, 2008 Author Posted January 3, 2008 ....hmmm thinking out loud here....Couldn't you just park that old domain onto the new website? Can you park it to a specific page on the new website or only the home page? Would I do that from the domain registrar or from here (TCH account)? Thanks! Quote
coldbee Posted January 3, 2008 Author Posted January 3, 2008 Okay. I've tried both the redirect from cpanel and the redirect via .htaccess and both are doing the same things: 1. work fine for home page 2. on non-home pages it redirects to the same "page" on the new site (i.e. oldsite/olddir/oldfile.htm goes to newsite/olddir/oldfile.htm). This isn't what I want. I want all old pages to go to the same new page (i.e. oldsite/olddir/oldfile.htm goes to /newsite/noticepage.htm). I'm getting 404 error messages from the new site because there aren't identical directories etc. set up there. Colby Quote
coldbee Posted January 3, 2008 Author Posted January 3, 2008 Okay. I've tried both the redirect from cpanel and the redirect via .htaccess and both are doing the same things: 1. work fine for home page 2. on non-home pages it redirects to the same "page" on the new site (i.e. oldsite/olddir/oldfile.htm goes to newsite/olddir/oldfile.htm). This isn't what I want. I want all old pages to go to the same new page (i.e. oldsite/olddir/oldfile.htm goes to /newsite/noticepage.htm). I'm getting 404 error messages from the new site because there aren't identical directories etc. set up there. Colby I found the answer. Here is what I put in my .htaccess file and it works: RedirectMatch 301 (.*) http://www.yournewdomain.com/ Thanks for your help! Colby Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.