Today: 26/04/20184
(Updated: 4:47pm)

#

The more I look at it I'm convinced that the redirect issues are limited to specific posts, and one in particular.

I worked around it by doing things manually in my 404 template using preg_match to identify if the url generating a 404 error matched the old permalink structure:

$erroruri = $_SERVER['REQUEST_URI'];

if ( preg_match('/\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/(.*)/i', $erroruri, $match) ) {
    $newurl = "https://colinwalker.blog/" . $match[1];
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: $newurl");
    exit;
}

It works fine but in testing one post (at least that I know of) causes an issue when loaded whether any form of redirect is in place or not, regardless of whether I try to access it via old or new permalink format.

I think I may have to delete and recreate it.

Status
#

I recreated the problem post and everything appeared okay so set about diving into the database to re-associate comments with the new version.

The problem came back.

It appears that one of the comments on the post had become corrupted somehow and was causing the loop. With this removed I think we're back to normal.

Status
# Comments

I found a second corrupted comment on a different post. I don't like the direction this is heading.

Status
#

Liked: Flashing Palely in the Margins...

"It doesn’t have to be this way, but anyone who is shocked that it is this way, right now, has been willfully ignorant. That ignorance makes everything worse."

This is such a powerful piece on inequality and how being shocked by the unfair treatment of minorities is definitely the wrong reaction.

To be shocked is to ignore that it happens all the time like shootings in the US or knife attacks in London.

Be angry, be disgusted, but don't be shocked or surprised - we're so far past that.

Status
Colin Walker
Colophon. Content: CC NY-BC 2.0 UK, Code: GPLv3
Colin Walker Colin Walker colin@colinwalker.blog

Thinker, writer, ideas man. Blogger & microcaster.