I've today your blog at Tubmlr, and my domain is much like this: blog.example.com. And Hyperlink to a publish during my blog could be such as this blog.example.com/publish/34545435345/some-title-etc

Now I've moved my content to some located Wordpress, and my domain is www.example.com. The posts from Tumblr in Wordpress now got a URL such as this: www.exampe.com?p=34545435345

I wish to setup b .htaccess to 301 redirect from the old subdomain to my new blog. I've attempted this rule within the .htaccess -file, however it appears to not work:

RewriteEngine On
RewriteRule ^/?posts/([0-9]+).*$ http://www.example.com/$1

Appears like it is simply because of incongruencies inside your example as well as your RewriteRule: your rule has /posts/ rather than /publish, as well as your destination is missing the "?p=". It's also wise to add the R=301 flag. Do this:

RewriteEngine On
RewriteRule ^/?post/([0-9]+).*$ http://www.example.com/?p=$1 [R=301]

To any or all other people who got exactly the same problem, here's my solution:

RewriteEngine On
RewriteRule ^/?post/([0-9]+).*$ http://www.example.com/?p=$1 [R=301,L]