Welcome to WebmasterWorld Guest from 54.198.69.193

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Please help with Redirect

     
12:45 pm on Mar 3, 2013 (gmt 0)



I did a search on the term redirect and tried some of the things explained in the posts I found, but I just can't get this to work.

I have an aged WordPress blog with over 500 pages indexed in Google that I no longer want to make available to the public. The domain is example.com where example is my first and last name. This blog is hosted on a shared Linux server from Hostgator.

I have another relatively new WordPress blog that is hosted on a dedicated Linux server, also with Hostgator. What I'm trying to do is redirect all search engine traffic from all pages indexed in Google for the old domain to the home page of the other blog.

In other words I need to do a redirect from all pages of domain #1 to the index page of domain #2 which is on a different server.

I've tried everything from simple "Redirect 301" statements to complicated rewrite rules in .htaccess and the old pages ALWAYS try to redirect to a corresponding page on the new site (which of course do not exist and never will, resulting in a 404 error). Right now the 404 page on the new blog is catching all the traffic to the non-existent pages but I would really prefer having it redirected straight to the home page if possible (and I realize that it might not be).

Help with the coding of a redirect that works the way I need it to work will be GREATLY appreciated. Thanks in advance, and sorry for the rambling explanation!
1:41 pm on Mar 3, 2013 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



What code have you tried so far?
1:55 pm on Mar 3, 2013 (gmt 0)



This is what I'm using now as a catch-all:

Redirect 301 / [newdomain.com...]

I have also tried this:

RewriteEngine On
RewriteRule ^(.*)$ [newdomain.com...] [R=301]

and this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.olddomain.com$
RewriteRule ^(.*)$ [mydomain.com...] [R=301,L]

Everything I've tried attempts to redirect the old page to a corresponding page on the new domain which results in a 404 error.
5:47 pm on Mar 3, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, ricksterguy!

your server access and error logs on the new domain server may tell you what the problem is.
11:30 pm on Mar 3, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



If I'm reading your first post correctly, the two domains live in different places-- different physical servers, even --so requests for Old Blog and requests for New Blog will never set eyes on each other. This simplifies things a lot.

The one thing you don't say is where your attempted redirects are located. If they are anywhere other than the old site's htaccess, requests will never see them so they can have no effect.

A Redirect by that name will not work. You can use RedirectMatch if and only if the old site does not use mod_rewrite at all. If it does, you will have to make your redirect using mod_rewrite. But that's trivial.

The most important thing is getting the redirect rule in the right location.

:: pause here to admire the way everyone is sitting on their hands w/r/t the "redirect everything to home page" aspect ;) ::
 

Featured Threads

Hot Threads This Week

Hot Threads This Month