Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a super old blog that I upgraded from 2.0.7 to 3.1 by upgrading over multiple versions. One of my biggest concerns was losing all the link juice from my legacy URLs but they were clearly made at a time when I hadn't considered how the URLs would need to change.

To my surprise I found that changing my permalink structure from

/articles/%category%/%postname%/

to

/id/%post_id%/%postname%/

went really smoothly as WordPress automatically looked up the appropriate URL -- which is great.

But I'm wanting to know since Ive changed link structures, does it send 301 header messages so I dont lose link juice from 5+ year old links, or is there a way for me to force WordPress to do this for old URLs?

Thanks!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Yes, WordPress will do a "301: Moved Permanently" to the "real" URL. WordPress calls this "canonical". When it hits a 404, WordPress will do a lookup on the URL fragments and attempt to find a post / page with that slug. If it finds one - it will do a wp_redirect() to the proper permalink of the post.

share|improve this answer
    
that explanation convinced me enough. I'm loving how its able to look up variations of the URL! –  qodeninja May 31 '11 at 17:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.