Can you please let me know whether it is possible to to use 301 redirect to redirect a page like sub.dom.com/fold/aa.html to dom.com/aa.html?

If it is possible, can you please let me know the syntax for the .htaccess file to do this?

I was not able to find anything to use for redirecting a subdomain and subfolder link to another place.