See if
this[
^] or
this[
^] can get you started.
I would put relevant info here, but its dealing with the rewrite module, the webconfig, or regex and both the links are pretty short. I hope that, even though this probably isn't the "all in one" solution for you, it will give you what you need to get moving.