I have website application
$redirect = ‘https://example.com/cf/wp-login.php?redirect_to=’ . urlencode($redirct_request_url );
wp_redirect( $redirect );
add_action( ‘wp’, ‘restrict_access_if_logged_out’, 3 );
When I switch website validate and navigate me to https://example.com/cf/cf/wp-login.php?redirect_to=%2Fhero%2F instead of https://example.com/cf/hero
I have check code for the website but its not working as expected.