How Do I Redirect WordPress Pages but not posts?

You can either add the following code to your functions.php or create a custom plugin with the code.

function my_custom_page_redirect() {
  if (is_page()) {
    wp_redirect(home_url());
    exit;
  }
}
add_action('template_redirect', 'my_custom_page_redirect');

Note – change the URL in wp_redirect() to whatever the ‘specificpage’ is. I just used home_url() in the redirect as an example.