Then you need to also check $_SERVER['HTTP_REFERER']
as part of your check for profile.php requests, e.g.:
IF the request is for profile.php AND the referrer is NOT candidat_dasboard, then redirect to candidat_dasboard.
^^ code that ??
]]>ok i will tried that!
But how exactly to code that?
??
]]>if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin/profile.php') &&
! strpos( $_SERVER['HTTP_REFERER'], '/candidat_dasboard')){
wp_redirect( home_url('/candidat_dasboard'));
}
]]>