You’re almost there, but your understanding of how rules work is slightly off. Also I would recommend using the page_rewrite_rules
filter:
function wpse_224942_page_rewrite_rules( $rules ) {
global $wp_rewrite;
/* Don't forget to change "my_query_var" in the rewrite rule too */
$new_rules = array(
'bz/([^/]+)/?$' => $wp_rewrite->index . '?pagename=bz&my_query_var=" . $wp_rewrite->preg_index( 1 ),
);
return $new_rules + $rules;
}
add_filter( "page_rewrite_rules', 'wpse_224942_page_rewrite_rules' );
/**
* Register our public query var.
*/
function wpse_224942_query_vars( $vars ) {
$vars[] = 'my_query_var';
return $vars;
}
add_filter( 'query_vars', 'wpse_224942_query_vars' );
Don’t forget to flush your permalinks (Settings > Permalinks > Save Changes). Now you can get the URL “parameter” like so: get_query_var( 'my_query_var' )
I would recommend changing my_query_var
to something more relevant to your project.