Forum Moderators: phranque

Message Too Old, No Replies

301 Redirect to another blog, but also change permalinks structure

         

horatiub

8:13 pm on Feb 28, 2009 (gmt 0)

10+ Year Member



Here is a situation that I am confronted with. I need to move abc.com to xyz.com, but in the same time, I would like the xyz.com blog to have a different permalink structure than the first one.

So, I know that in .htaccess I can place

Redirect 301 /abc.com/ [xyz.com...]

but how I redirect the links to the new structure? Or an even better question: are my risks of losing Google traffic because of this, even higher?

The blog has the structure /%year%/%monthnum%/%day%/%postname%/ and I wanna move to /%postname%.html

I appreciate all the answers.

Thanks

g1smd

8:28 pm on Feb 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Redirecting to the new structure will need the redirect system to look up some sort of table, or database, to obtain the new URL for each possible original URL request.

This cannot be done in .htaccess alone.

horatiub

8:55 pm on Feb 28, 2009 (gmt 0)

10+ Year Member



ok, so the steps will be to redirect 301 from old domain to new one, and then in the new domain, to redirect internally the links to the preferred structure.

It's a Wordpress platform.

g1smd

9:23 pm on Feb 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No. A double redirect will not pass PageRank.

Instead, you will need to point the old domain at the same server space as used by the new domain, and install an internal rewrite that captures all requests for the old domain (and only the old domain - both www and non-www), and internally rewrites them to a script. The script will access the database, and get the new URL matching the old requested URL. You'll need to make that database and write that script. The script will then need to issue a redirect to that new URL. PHP can send such a redirect using the HEADER instruction.

horatiub

9:45 pm on Feb 28, 2009 (gmt 0)

10+ Year Member



I guess it's a bit more complicated than I thought...

I'm assuming for now, until all the links are 301 redirected, I should do the Redirect 301 in .htaccess...and a few months later, I will attempt to change the permalinks on the new domain...

Am I right? Would this be the best solution for now?

g1smd

9:58 pm on Feb 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Doing the redirect in .htaccess will need you to put one line of code for each page of the old site... general impractical if there are more than a few dozen URLs.

horatiub

5:53 am on Mar 1, 2009 (gmt 0)

10+ Year Member



so here is what I did..I used Redirect 301 oldsite /newsite

but basically now the link structure is the same. I wonder if I should attempt now to change them and use Wordpress plugin to redirect them.

g1smd

6:22 pm on Mar 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Again, a double-redirect per URL will not pass PageRank from the old URL to the new.

Additionally, having one set of redirects and then changing to another set could badly confuse search engines - especially Yahoo and Live.

horatiub

8:51 pm on Mar 1, 2009 (gmt 0)

10+ Year Member



Ok, thanks, so for now, I should just stick to the 301 redirect to the new domain.

g1smd

10:21 am on Mar 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, but should you ever change to a new structure on the new site, you will need the change the redirects so that the old site directly redirects to the new structure on the new site, i.e. does not redirect twice.

You'll then also need to redirect the old structure on the new site to the new structure on the new site.