• Resolved androjungle

    (@prashanthvarma42343)


    Hi i have some pages where i show custom 404 page redirection depending on type of device. Also when i use rank math to redirect all 404 pages to home page, during this process rank math is redirecting my cutom 404 pages to home page, i want to exclude these pages where custon 404 redirection is enabled so that they will not get redirected to home page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @prashanthvarma42343,

    Thank you for contacting support.

    That is not possible. The setting for this is an on/off switch so you either have it enabled for all the pages or disabled for all the pages.

    Don’t hesitate to get in touch if you have any other questions.

    Thread Starter androjungle

    (@prashanthvarma42343)

    is there any code that i can add to the page so i can exclude it from rank math. like the id that rank math use to filter the pages and so that i can exclude it with my code

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @prashanthvarma42343,

    It’s possible to prevent the metadata from our plugin to be generated on some pages but this particular feature of 404 redirections is not possible to be modified with a filter.

    Don’t hesitate to get in touch if you have any other questions.

    Thread Starter androjungle

    (@prashanthvarma42343)

    $current = get_post_meta( $post->ID);
    if( $current == 'mobile' ) {
            include_once( get_stylesheet_directory() . '/content.php' );
    

    this is a sample code iam using but its just a get_stylesheet_directory, but the rank math is thinking it as a 404 page and redirecting it to home page, but actual it is not a 404 page, its just a custom redirection page.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @prashanthvarma42343,

    Our plugin will only redirect the page if it returns a 404 status code. You will have to make sure that the page doesn’t return a 404 status code or change the Fallback Behavior to Default 404 in our plugin’s settings to fix the issue.

    Please do not hesitate to let us know if you need our assistance with anything else.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude Pages From 404 Redirection’ is closed to new replies.