add support for url rewriting (useful for pushstate support)