rewrote dolink, urlrewrite