My review: Spray - Living in Neon ►

◄ A few whys and wherefores of online journals for me...

2007-04-05 📌 Site Update: mod_rewrite accident

Tags 🏷 All 🏷 Updates

To coin a phrase: whoops. It appears that I inadvertently managed to break all of my site feedback forms from the start of February through to now. If you tried to leave a guestbook or weblog comment during that time, grovelling apologies. If you tried to get in touch via the contact form and see this and happen to remember what it was you wanted, please resend. And also grovelling apologies.

"How did he do that?" Well, it turns out that mod_rewrite can only pass data received via GET, but its voodoo is low enough level that form actions get rewritten by it. So if, say, your form points to "thing.php" but "thing.php" resolves peacefully in a browser to "thing" then "thing.php" no longer has a REQUEST_METHOD of POST or any form data by the time it gets called. Which does nothing with the guestbook and weblog except send you back to where you were, but at least it's obvious nothing has happened. The contact form, on the other hand, is aware that someone has tried to send something... but because there's invalid form data assumes that it's being attacked by a automated spam process, and forwards to the "this has sent" page anyway.

And of course the mod_rewrite stuff was added after the big site changes in January, when I thought to test the forms. Should've tested them again separately.

(The "Listening to" box of Suicide Club [2002] currently in the column on the right has nothing to do with any of this. I'm listening to MP3s of the soundtrack, which was never officially released but can be be downloaded from here. It's an interesting film.)

💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.