Thursday, June 24, 2010

A Little URL Rewriting with Managed Fusion Rewriter

I'm stuck on IIS 6 for now and I needed to do a bunch of URL rewriting. No one wants to spend money these days, so we didn't spring for the Helicon ISAPI_Rewrite product. I have a lot of legacy URLs to handle, but we won't keep them in place for more than a year and by that time we'll likely be on IIS 7 with its own rewriting tools.

I went with the Managed Fusion Rewriter tool both for its promised flexibility and the fact that it used the Apache mod_rewrite syntax.

I like it, but I ran into a few quirks I thought I'd pass along.

First, if you're using RewriteCond and trying to grab query string parameter values, %1 will hold the name/value pair. %2 will hold the value you're probably looking for. If you have multiple values you're catching you would just continue to increment -- %3, %4, etc. Here's an example that works as I expected it:

RewriteCond %{QUERY_STRING} ^lessonid=([0-9]+)$
RewriteRule ^/Explore/KeyQuestions.aspx$ /Analyze/Display/%2 [R=301,NC,L]

Second, in mod_rewrite you can apparently stack multiple RewriteCond one on top of another. I was not able to get it to work with this tool.

Friday, June 11, 2010

New Phrase: Smells Like Mountain Oysters To Me

I suggest the casual usage of a new phrase: smells like mountain oysters to me.

What does it mean? Roughly, it means someone's trying to make you look like an fool, possibly in front of others, but definitely for their own gain. It could also simply mean someone's trying to feed you a line of bullshit.

Would you eat a bull's testicles? Neither would I, but that's what mountain oysters are. The thought of that makes me want to vomit. No one should be eating anyone else's balls. Ever. Calling them "mountain oysters" is so ridiculously misleading to me that it makes me want to punch your mom.

By the way, if you're reading this and you would eat them, stop reading my fucking blog and never ever come back.


The next time you suspect someone's trying to get you to do something and you think they're withholding key information, smells like mountain oysters to me.

The next time someone's asking you questions and you think they're going to use the information against you in some way, smells like mountain oysters to me.

The next time you think someone's intentionally trying to lead you into making a bad decision to advance their own goals or just to entertain himself, smells like mountain oysters to me.