RISOLTO!
(per i posteri)

Codice PHP:
$checkblogdir substr($_SERVER["PHP_SELF"],1,4);
if(
$checkblogdir=="blog"){
    
$backdir_blog "../";