简体   繁体   中英

301 redirect – Tumblr to Wordpress

I've moved a blog from tumblr to wordpress, so far only the posts has been imported to the new wordpress setup. What's left is to do the 301 redirects.

I have more than little knowledge about this so therefore I need a little help. A posts url in tumblr looks like this:

example.com/post/[ID]/post-slug

And in wordpress like this:

example.com/2012/04/07/post-slug

The post slug is equal so I guess there should be a way to accomplish this. Oh and if it matters, the domain is the same.

I solved it myself using this piece of code:

RewriteRule ^/post/(.*?)/(.*?)$ /$2 [R=301,L]

But as I said, I'm not good at this so if anyone has something better, tell me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM