added support for url rewriting in the rest of the application.