• @johhny5 I wonder why the plugin creates simple redirections when I change a post’s slug, given the various other things this could impact, such as:

    1. The respective post feed URL
    2. What happens if the post’s category slug is changed
    3. What happens if any other part of the permalink is changed

    Wouldn’t it be better to create regex redirections with only the slug part, i.e. “/post-slug”, to hand all these cases (and maybe others I haven’t thought about)?

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

    (@johnny5)

    The plugin currently only monitors the post’s slug and nothing else. Monitoring other things is considerably more complicated, and not something that generally changes much.

    Creating automated regular expression redirects would likely lead to problems.

    A future change may increase what is monitored and redirected. There are a few requests already tracked in Github:

    https://github.com/johngodley/redirection/issues

    It is likely to still create simple redirects though.

    Thread Starter Gal Baras

    (@galbaras)

    Sorry, there was a small mistake in my original post. The regular expression should be /post-slug/, with a closing slash.

    Since WordPress slugs are unique, using a regular expression like this should only target relevant URLs.

    Personally, I’ve changed many of the automatic URLs to what I’m suggesting and never had a problem that I wouldn’t have otherwise.

    Maybe this can be an option?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatic post redirections: simple vs. regex’ is closed to new replies.