add check to only rewrite html pages