Heal Your Church WebSite

Teaching, rebuking, correcting & training in righteous web design.

Blocking bad bots without mod_rewrite

“The Apache URL Rewriting Engine seems to grow more popular for each year. It certainly is a powerful, handy, and cool tool … But using mod_rewrite is difficult for non-programmers and the syntax is rather cryptic even for programmers. That means it’s easy to make mistakes and if used extensively the resulting mess of rewrite recipes can be hard to maintain.”

Can I hear an Amen to the quote above from the Scatter/Gather thoughts blog?

Yes, I know for some of you that was like a sermon in Greek – but what Johan Petersson is writing about is a way to stop spambots, and stop image thiefs from consuming your bandwidth without having to go all mod_rewrite about it.

mod_rewrite, for those of you who don’t speak pure geek, is a rewrite engine that has been described as “the Swiss Army knife of URL manipulation” … meaning a way of taking an incoming URL request and redirecting towards/at something else … or in the case of a spambot, sending it straight to h-e-double-tooth-picks!

Problem with that way is that it is not accessible to most on/in a shared hosting situation as it requires working at the operating system level.

The simpler alternative? Manipulating the usually accessible .htaccess file so you can deny access to image thiefs and re-direct other nere-do-wells to the target spam poison website of your choice.

Anyway, I’d suggest going over to said article and learning some of the nifty and not-as-hard as mod_rewrite techniques Johan has illustrated in some simple snippets.

And I promise, next post won’t be so geeky that only 3 or 4 of is get the abundant utility the cited article suggests