URL monitoring shouldn't add redirects for custom post types (4 posts)

  1. jkohlbach
    Posted 2 years ago #

    Hi guys,

    I recently uncovered a problem where Redirection with the URL monitoring option enabled will add redirects for custom post types.

    I found this out because it borked the redirection destination URL in a couple of these redirects on a WooCommerce install and as a result these product pages were redirecting to the home page.

    In the options it says for Post and Pages only, I think you might be missing some validations to check which post type it is before going ahead and putting in a redirect. I could imagine some other plugins creating custom post types would have issues with this as well.



  2. John Godley
    Plugin Author

    Posted 2 years ago #

    In what way is it wrong to redirect a custom post type? It seems to be a useful thing to do and core WP does this anyway.

  3. jkohlbach
    Posted 2 years ago #

    Hi John,

    The option specifically says Posts and Pages, so I wouldn't expect it to do so for CPTs.

    Not all CPTs need Redirection to handle URL changes, but I guess that point is up for debate.

    Maybe it would be better to have the option to exclude/include custom post types and have Pages and Posts on by default?

    Also as far as I know core doesn't manage 404s when slugs change.. can you expand?

  4. jkohlbach
    Posted 2 years ago #

    Hey again John,

    Just took a look through your changelog and it seems my problem was similar to the one fixed in 2.1.29

    Fix problem with custom post types auto-redirecting (click on 'groups' and then 'modified posts' and clear any entries for '/' from your list)

    This is pretty much what happened, only I'm not on a version less than 2.1.29. This site was on 2.2.13 and only fairly recently re-launched with a fresh install.

    I can't seem to reproduce the issue, so I'm not sure if it was a once off or not... sorry I can't be more helpful!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Redirection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.