Topic: https://brettterpstra.com/2013/04/07/fun-with-intelligent-404-pages/
hide preview

What's next? verify your email address for reply notifications!

Nick Hayday 11y, 332d ago

Might want to change the message if your search finds nothing

hide preview

What's next? verify your email address for reply notifications!

timwindsor 11y, 347d ago

This is really neat. Why am I not surprised? :-)

hide preview

What's next? verify your email address for reply notifications!

andr3wyong 11y, 347d ago

If you’re only looking at single-character misspellings and static content, Apache has a great, almost zero configuration module for that:
http://httpd.apache.org/doc...

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 11y, 347d ago

yeah, that's running here. I'm looking to help people who followed an old link that may have no correlating match in the physical file system anymore. Plus, if someone tried something like brettterpstra.com/nvalt, they'd still find it even though that's not the url. More for fun than anything, though.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

andr3wyong 11y, 347d ago

Brilliant - I hadn’t figured if you were running mod_speling, since I was just messing around with the posts themselves!

hide preview

What's next? verify your email address for reply notifications!

rhythmthing 11y, 347d ago

Brett, this is neat, but just a heads up: it seems that there's a problem with your "blink(1)" link (it's a relative link when it shouldn't be), as well as a bug in your 404-handling JavaScript that causes it to get stuck in an infinite loop when it encounters a URL it doesn't understand (try clicking the blink(1) link!)

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 11y, 347d ago

There, that should be better now. Scoring a bunch of fuzzy matches across 600 posts can eat up a LOT of memory on long strings. Chopping them down at the start now.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

rhythmthing 11y, 347d ago

Cool, figured it was an infinite loop when my browser started pegging the CPU, but I obviously didn't look too deeply in to it. :)

hide preview

What's next? verify your email address for reply notifications!

ttscoff 11y, 347d ago

Yeah, just noticed that happening on my dashboard. Fixing the link right now (my blink(1) is glowing red). Will have to look at the loop.

hide preview

What's next? verify your email address for reply notifications!