Redirect posts to sub domain except pages
We have a WordPress site, which contains posts and pages. Now we moved posts into sub domain but we kept pages into root domain. Only Posts has
.html extension and there is no difference in the URL for Posts & Pages.
www.mydomain.com/sample-posts.html need to redirect with
How to redirect only posts in to sub domain?