So, I had a minor disaster. This is what went wrong and how I fixed it.

We use the amazing WordPress Redirection plugin. We recently started a survey and the best way to contact the participants was by letter. We had to include a URL to the survey. Some people were mistyping the URL. For example:

/direct-payments-servey
/direct-payments-urvey
/directpayment-survery/
/directpaymentsurvey
/directpaymentssurvey

The correct URL is /direct-payments-survey/

To fix this, at 8:10am this morning, I threw up a very hasty regex redirect and went to have my breakfast, slapping myself on the back. It matches all the errors and, I thought, would catch most other typos. Here it is:

^/(directpayment|direct-payment).*

Problem is it also caught the target URL and an endless redirect ensued. The page was down for 9 hours.

After my trials a little while back trying to get to grips with not matching strings in a regex I had a good idea for how to fix it.

^/(?!direct-payments-survey)(directpayment|direct-payment).*

It was that easy. Here is the regex on regex101 as usual.

The silver lining here is that I now have a very reusable fix when I need to match something very close to the target URL. I’ve had this problem in the past and often just created a completely different URL. Even then this was not foolproof as WordPress keeps it’s own records of old URLs and redirects.

I do like celebrate a victory but today I must acknowledge a failure. I put a pretty important web page into an endless redirect loop with some fast and loose admin. Sadly, I made that change at 8:10am and I only just fixed it… ?

I use Chrome once a month at work to access analytics from the major social media platforms at it almost always breaks. How is this the world’s most popular browser?

I have a lot of love for the noisli app but their choice of colours, especially their “brand” green (this green) is an accessibility nightmare. Most of their colour choices fail even the basic contrast checks.

Also, on a personal note, I wish they would add some darker colours and respect “dark mode” or “night time”!

I do not consider myself an AFOL but I am an adult and I am a big fan of LEGO.

And, I just love this set.

I do have a cabinet in my office with a fair few models in but there are very few sets out there that I would happily have in my living room. I would be absolutely thrilled to have this one on display, though. I can’t wait to get it. I hope it is widely available!

FTL is one of my favourite games. It is also one of my favourite soundtracks. I love listening to soundtracks when I work because I find vocals distracting. Video game soundtracks work really well because they are often low key.

Today I thought I would check out the soundtrack for Into The Breach, which is also made by subset games. Lo and behold, Ben Prunty also composed the soundtrack (as he did for FTL) so that is a must listen, I thought. Turns out it is not on Amazon Music but I did find it on YouTube. I broke the first rule of the Internet and read the comments. I was very entertained. I have not actually played Into The Breach yet (no, I don’t know why) but the comments make me want to even more.

I like soundtrack so far too. Is a lot less chip tune but suitably dramatic, especially Old War Machines.