$file = $_SERVER["SCRIPT_NAME"]; $sonuc = str_replace("/","",$file); if ( $sonuc == 'index.php' ){ // Kodlar Buraya }