if ( $url_query == '/resh/category/examinations' ) :
header('HTTP/1.1 301 Moved Permanently');
header("Location: http://$url_site/r/exam");
exit;
elseif ( $url[1] == 'resh' && isset($task_id) && !isset($url[3]) ) :
header('HTTP/1.1 301 Moved Permanently');
header("Location: http://$url_site/r/$task_id");
exit;
endif;