Redirect to dashboard based on user role

Hi WP’ers,

I’m trying to hide some pages for child site admins of my multisite. I can use remove_menu_page( ” ); but this only hides them. I don’t want them to be accessible through the url. I tried something like this, but my coding skills aren’t great..:

if ( ! current_user_can( 'update_core' ) ) {
$current_site = get_current_site();
$current_domain = $current_site->domain;
if( $current_domain == $current_site/wp-admin/themes ) {
<?php wp_redirect( '/wp-admin/index.php', 301 ); exit; ?>

Can somebody help me with this?

Thanks, Menno