How to redirect non admins to homepage if trying to view mysite.com/wp-admin/?

I want all my users (contributors and authors too) but the admin to be redirected to the homepage if they try to view mysite.com/wp-admin/.
Contributors and Authors must be able to add and edit posts as usual, along with others they’ve to be forced to be redirected…
I’ve already removed the link to the dashboard…
I’ve also tried some plugins but the one that gets closer (Remove Dashboard Access) redirects to main page but prevents the contributors and authors from adding, editing and deleting posts.
Thanks!