Первые два правила заменить на:
array(
"CONDITION" => "#^/([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)/([0-9]+)\.php.*#",
"RULE" => "dir=$1§ion_code=$2&id_el=$3",
"ID" => "",
"PATH" => "/test.php",
),
array(
"CONDITION" => "#^/([0-9a-zA-Z_-]+)/([0-9]+)\.php.*#",
"RULE" => "dir=$1&id_el=$2",
"ID" => "",
"PATH" => "/test.php",
),
array(
"CONDITION" => "#^/([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)/([0-9]+)\.php.*#",
"RULE" => "dir=$1§ion_code=$2&id_el=$3",
"ID" => "",
"PATH" => "/test.php",
),
array(
"CONDITION" => "#^/([0-9a-zA-Z_-]+)/([0-9]+)\.php.*#",
"RULE" => "dir=$1&id_el=$2",
"ID" => "",
"PATH" => "/test.php",
),