Support » Plugin: Redirection » [Feature Request] Redirect post assigned to category

  • Hello John,

    Feature Request
    I am looking for a possibility to redirect posts which are assigned to a catogory to a particular internal page of the site. Means, I define the redirection based on post categories and not based on post slugs.
    I did a quick trial based on: and can tell that this works great. But of course, integrating this into a existing and well working plugin instead writing a new one is the much better approach 🙂

    post-slug: “my-post” and “dolly-is-great”, category: “special”
    category: “special”, rule: “special” –> “/home” –> –>

    All posts which are assigned a category which is redirected will not show the post page but a page defined. With this, you do not need to know the post slugs to redirect but the category which the posts are assigned to.

    Maybe I have overseen it, but if not, this would be a very helpful feature.

    Many Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley


    You can use a regular expression for this:

    Plugin Author John Godley


    Actually, not if the posts are at the root URL.

    A post can also belong to multiple categories.

    Thanks John for replying.

    Regarding regex, no this cant be used as the regex to be applied needs to know the source url somehow. Which would mean that you need to know/identfy the post-slugs. This is exactly to be avoided. As far I have seen, you can´t target regex to post categories.

    Your statement “not if the posts are at the root URL” is imho also not true, because if you look on the code example in my comment above, it checks if the post to be shown has a category matching an element of the array list which is not dependent on the url location.

    My favorite whish/approach would be, that this behaviour (in the UI, select post categories from the list and apply a post redirect to a internal url in case of a match) becomes part of the redirect plugin.


Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.