rewrite HTML links only if rewrite_links_serverside is True

adds an if statement before doing the re_sub().