How to set posts redirect to a new domain

I'm moving out a blog to a new domain, and redirect all posts specifically to a new domain. http://olddomain.com/category/postname should go to http://newdomain.com/category/postname Apache Server On Apache that allows .htaccess,…