开发者

How to redirect wordpress post links that are using post_id to new url struture of postname

I have a slight problem... we made a change to our url structure the other day and have broken links all over.

What I did was change links from:

http://blog.mydomain.com/articles/123

To:

http://blog.mydomain.com/articles/this-is-a-smaple

Is there anyway to direct any links linking to the pages ID number to the postname????

Th开发者_JAVA技巧e old url structure is still being published throughout our RSS feed on facebook. So I am trying to catch those people that are or maybe clicking on our links on our facebook posts and redirect them to that posts postname url? Does that make sense?

Thanks and help would do


Matthew,

You can use the Advanced Permalinks plugin. It'll redirect old permalink structures to the correct posts. Checkout the description on the plugin page.


In your new URL handling code, check to see if everything after the last slash is decimal numbers, if so, use the old URL handling code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜