rewrite HTML links only if rewrite_links_serverside is True

adds an statement before doing the re_sub().