Stop Custom post type from being searched via URL

You could use template_redirect hook to redirect your pages, like this:

function my_page_template_redirect() {
    global $wp_query;
    $object = $wp_query->get_queried_object();
    //this returns queried object. Check the conditions and redirect
}
add_action('template_redirect', 'my_page_template_redirect');