added url rewrite middleware

HTML5 location mode requires server side url rewriting