How to redirect a Buddypress tab to a specific URL?

I've created a custom tab within the members homepage area of buddypress, by adding custom code to my bp-custom.php file suggested by Hoang in this thread.

Here is my version of it:

<?php
// buddypress customizations go here

// Customization by Hoang Ngo at WPMUDEV for custom tabs and resulting pages on the buddypress homepage
function my_bp_nav_adder() {
	global $bp;
	bp_core_new_nav_item(
			array(
					'name'                => __( 'Inbox', 'buddypress' ),
					'slug'                => 'my-inbox',
					'position'            => 50,
					'screen_function'     => 'inboxdisplay',
					'default_subnav_slug' => 'my-inbox',
					'parent_url'          => $bp->loggedin_user->domain . $bp->slug . '/',
					'parent_slug'         => $bp->slug
			) );
}

function inboxdisplay() {
	//add title and content here - last is to call the members plugin.php template
	add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );
	add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );
	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

function my_groups_page_function_to_show_screen_title() {
	echo 'Inbox';
}

function my_groups_page_function_to_show_screen_content() {
        echo do_shortcode( '[message_inbox]');
}

add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 );
?>

The code creates a new tab and buddypress page to which the user lands when clicking on the tab. I'd like the tab to redirect the user to a specific non-buddypress url instead, specifically "mydomain.com/inbox".

I realized the 3rd and 4th functions aren't necessary in my custom code, if I rewrite the 2nd function to create the redirect. Here's what I came up with:

<?php
// buddypress customizations go here

// Customization by Hoang Ngo at WPMUDEV for custom tabs and resulting pages on the buddypress homepage
function my_bp_nav_adder() {
	global $bp;
	bp_core_new_nav_item(
			array(
					'name'                => __( 'Inbox', 'buddypress' ),
					'slug'                => 'my-inbox',
					'position'            => 50,
					'screen_function'     => 'inboxdisplay',
					'default_subnav_slug' => 'my-inbox',
					'parent_url'          => $bp->loggedin_user->domain . $bp->slug . '/',
					'parent_slug'         => $bp->slug
			) );
}
// rewrote this function in Hoang's code to have tab redirect to specific url instead of the buddypress page otherwise created.
function inboxdisplay() {
header('Location: https://mydomain/inbox/');
//add title and content here - last is to call the members plugin.php template//	add_action( 'bp_template_title', 'my_groups_page_function_to_show_screen_title' );
//	add_action( 'bp_template_content', 'my_groups_page_function_to_show_screen_content' );
//	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

//function my_groups_page_function_to_show_screen_title() {
//	echo 'Inbox';
//}

//function my_groups_page_function_to_show_screen_content() {
//        echo do_shortcode( '[message_inbox]');
//}

add_action( 'bp_setup_nav', 'my_bp_nav_adder', 50 );
?>

...where mydomain.com/inbox is the location of the specific url to which I want the tab to redirect.