rewrite is a declarative framework for URL routing, based on MarkLogic's URL Rewriter for HTTP Application Servers. rewrite aims to provide an expressive language for specifying REST applications. rewrite is heavily inspired by Ruby on Rails, so if you are familiar with routing in Ruby on Rails, it should be really easy for you.
rewrite comes bundled with two sample applications to make it easier to understand:
As rewrite is an open-source project, others are encouraged to contribute to it.