Viewing 13 replies - 1 through 13 (of 13 total)
  • Hello again, Clay!
    It does not add them automatically, they must be added manually if needed.

    We discussed adding something like this in the past, and although it is a great feature, we decided against it. The reasons being two-fold – it would greatly increase the amount of redirects being added and stored, and we would need a way for someone to edit these changed URL redirects (do we do it in Quick Redirects, or in the post meta, or are they hidden or what?). So in the interest of the plugin’s initial intent (simplicity and ease-of-use for all), we opted against adding it. Redirection is a GREAT plugin, I have said that before, but it can be very complex to use, that is why we created this plugin all those years ago – simplicity.

    I have suggested though, the possibility of adding some form of messaging after the slug is modified, asking the user is they want to prevent the problem link and add the redirect (then they would be aware and decide if they want to add it or not). This is in our list of ‘possible’ feature updates – so maybe one day in the future we will have something. Until then, they need to be added manually.

    Warmest regards,
    Don

    Thread Starter webmaestro

    (@webmaestro)

    Good… I really like the idea of adding a hook giving a heads up when the slug is changed.

    Another potential location for help here is adding some help on the Permalink page. Even better, adding some logic to the permalink page that *optionally* and automagically creates the redirects when the permalink is changed.

    I would think that these types of redirects *shouldn’t* be changed (did I just should on someone here? ;-).

    You could expose the ability to export a list of 301 redirects (for Quick Redirect import) that would be useful if a permalink change is made. I don’t recall how to get ‘all’ of the URLs available, but I imagine it’s available w minimal effort?

    So the /wp-admin/options-permalink.php would look like this:

    Common Settings

    (  ) Default	https://domain.com/?p=123   [Output redirects CSV for this]
    (  )  Day and name	https://domain.com/2015/09/18/sample-post/   [Output redirects CSV for this]
    (o)  Month and name	https://domain.com/2015/09/sample-post/   [Output redirects CSV for this]
    (  )  Numeric	https://domain.com/archives/123   [Output redirects CSV for this]
    (  )  Post name	https://domain.com/sample-post/   [Output redirects CSV for this]
    (  )  Custom Structure	https://domain.com/%year%/%monthnum%/%postname%/     [Output redirects CSV for this]

    (NOTE: Custom Structure would be dynamic based on the structure in the <input .. /> ??

    Thread Starter webmaestro

    (@webmaestro)

    Whoop! Deleted a double-post.

    Clay,
    Thanks for the suggestions!

    I think this has to be thought through a bit before we will decide to add anything – as I have learned over the years, that no matter what you think someone will do, there will always be someone who does it differently.

    In some of these instances, there are easy modifications that will fix a permalink structure change, so exporting a list of redirects would be senseless as a single line or two of code would fix it and not really add much to the overhead. Whereas adding 500 or 5,000 or 50,000 redirects would most definitely put a damper on things. And before you say, what? 50,000 posts, no way? Yes! that is correct. I have people all the time contacting me saying they changed their permalink structure and have tens of thousands of posts or pages set up and want to know how to import them all into the Quick redirects section. Crazy as it may seem, that many redirects seems unfathomable to me – and I don’t see how anyone in their right mind would even consider it – but there you are, some people do, and will.

    Anyway, thanks for the suggestions, as I said. We will definitely consider some things for future updates.

    Warm regards,
    Don

    ** Anyone reading this post that changes their permalink structure – please look for a better way to change the old URLs!! There are many plugins out there to help with this – we have about a dozen we have written ourselves (for free) that help fix permalink structures **

    Thread Starter webmaestro

    (@webmaestro)

    Ah yes. I see, and yes there are better ways…

    What we’d like is:

    CURRENT:
    /YYYY/MM/some-pithy-post-title-that-is-seo-friendly-and-longish/

    DESIRED:
    /category-name/some-pithy-post-title-that-is-seo-friendly-and-longish/

    OR

    /category-name/sub-category-name/some-pithy-post-title-that-is-seo-friendly-and-longish/

    Clay,
    If you are trying to do this now (for a changed /YYYY/MM/DD/ permalink), check out this plugin:
    https://www.fischercreativemedia.com/current-downloads/day-name-permalinks-to-postname-permalinks-fix1.0.3.zip

    It may help you fix the issue or, at the very least, point you in the right direction.

    If you do need to modify the plugin, take out the include to the plugin updater, as that is just so we can provide updates if things change.

    Warmest regards,
    Don

    Or there is also this one that may help:
    https://www.fischercreativemedia.com/current-downloads/lost-post-404-fix1.0.0.zip

    Regards,
    Don

    Thread Starter webmaestro

    (@webmaestro)

    Hi Don,

    So, which of your plugins would be better to go from our /yyyy/mm/post-permalink/ to /yyyy/mm/category/post-permalink/ OR /yyyy/mm/category/sub-category/post-permalink/?

    Is one better than another for my purpose? Do you plan to integrate them into one plugin?

    ??

    I would try this one:
    https://www.fischercreativemedia.com/current-downloads/lost-post-404-fix1.0.0.zip

    Let me know if that does not work for you.
    Warmest regards,
    Don

    Thread Starter webmaestro

    (@webmaestro)

    I checked out your plugins link:

    https://www.fischercreativemedia.com/plugins/

    I don’t recall seeing that one on your site last week.

    Does it work after-the-fact or something (e.g., it only works after a category is changed, and the post returns a 404)?

    Or does it somehow work proactively, and set up redirects when a change is made (e.g., when a category ‘slug’ is changed, thereby changing the URLs for that category’s posts)?

    Clay

    Clay,
    They are all simple ‘reactive’ plugins that trigger when a 404 is found. So, if you switch your permalink structure it would possibly cause a 404 for a URL – the plugin just checks for a post with a matching slug and if it finds one, it redirects (301) to the new URL.

    We don’t like to do anything that modified the permalink structure or .htaccess whenever possible. As you will note, all of our plugins are designed to just cease function when turned off so that people do not have to try to figure out how to undo anything if there is a problem later on.

    Make sense?
    Let me know if you have issues or problems.

    Warm regards,
    Don

    Thread Starter webmaestro

    (@webmaestro)

    That makes perfect sense and is elegant.

    It’s not searching for a ‘complete’ permalink, but rather it’s just searching for a post slug that matches. That *could* get dicey if we have multiple posts with the same slug (unlikely to occur, but still possible). In those rare cases, we could just add a Redirect before ‘lost’ gets triggered! ??

    Thanks again Don!

    Clay

    p.s. Feel free to mark this POST as RESOLVED.

    Thanks Clay.
    Yes, if you do have multiple matching slugs (which is usually rare, but does occur), it will return the 404 error as it does not know what one to use (as it found more than one result). In those cases, a Quick Redirect can be set up to point to the correct page.

    Most of these helper style plugins we have available are just a few lines of code, but are very helpful because they save a ton of manual work on the user’s end and serve a very specific purpose.

    We are in the process of updating the website, so eventually we will put more of these free helper plugins up on the site for people to download if they need them. We did not put them on the WordPress plugin repository, as sometimes there are more robust plugins that do the same thing, but someone just needs the quickest and simplest fix so we have that for them. Some of them probably could be on the plugin repository, but we just don’t have the time or staff to dedicate to providing support for all of them, so we just have them on our site.

    Warmest regards,
    Don

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Automatically add a 301 redirection when a post's URL changes?’ is closed to new replies.