Add a callback to the rewriteURI method
Fixes based on the PR comments
Merge pull request #57 from fhrbek/rewrite_uri_callback

WIP - Add a callback to the rewriteURI method