Added support for url rewriting