redirecting only if html