URL rewriting middleware for express