All I wanted was to make URLs in Mejiro less unwieldy, so they look not like this:
https://mejiro.photo/index.php?file=photos/Travel/Palermo/20230423-130156.jpeg&album=Travel/Palermo
But like this:
https://mejiro.photo/index.php?file=photos/Travel/Palermo/20230423-130156.jpeg
This relatively straightforward task (or so I thought!) turned into several hair-pulling evening sessions. The idea was to replace the ?album=
parameter with the $_SESSION
global variable. I blame on me being clueless when it comes to coding for spending so much time on solving this seemingly simple problem. But in the end, my puny mind prevailed. And, of course, the solution was as simple as I imagined: it just took me longer to arrive to it.
I didn't plan to spend most of my Sunday tinkering with Mejiro, but I did. Why? Because while watching an Australian series on ARTE, I came up with an idea of how to mask URL parameters to obfuscate file paths. I tried a few approaches and I'd settled on using bin2hex and hex2bin functions for that. I'm reasonably sure it's not the strongest way to mask URL parameters, but it's good enough for the task at hand.