WordPress URL redirect

This is quite possible. First off, Making pagename/{customString} resolve as the page itself instead of 404, then, you’re free to decide whether to keep the URI as is and serve the page content, or redirect back somewhere e.g page permalink ( get_the_permalink() ):

add_action( "init", function(){
    $pagename = "pagename"; // page slug
    add_rewrite_rule(
        sprintf('^%s/([^/]*)/?', $pagename),
        sprintf('index.php?pagename=%s&pageParam=$matches[1]', $pagename),
        'top'
    );
});

add_filter( "query_vars", function( $vars ){
    $vars[] = "pageParam";
    return $vars;
});

add_action( "template_redirect", function(){
    if ( $param = get_query_var( "pageParam" ) ) {
        /* make sure param is not for comments pagination or smth similar */ 
        wp_redirect( get_the_permalink(), 301 );
        exit;
    }
});

If you don’t wish to have the redirect then remove the code hooked into template_redirect (as of line:15). To get that custom string ( {any string here} ), simply call get_query_var( "pageParam" ).

Hope that helps.