2025/12/06#p1
When I started using the home page, the blog was moved to /blog/ and has been there ever since. This feels a bit unwieldy, so I started looking at options to simplify the URL structure.
I didn't want to move everything back to the root as that would get too messy. What were the alternatives?
There were already a number of redirects happening in .htaccess to ensure things worked. It made sense, therefore, to look at expending on this.
Having DirectoryIndex /blog/ in the root .htaccess causes the server to deliver the blog while keeping the address bar as showing the root. So, an address like /blog/?date=2025-12-06 becomes /?date=2025-12-06.
The rest came down to making sure all links and calls functioned correctly, and automatically removing /blog/ from URLs in post content – I just added a str_replace() in my content filter.
Everything looks to be working correctly but, if you find any issues, just shout.