Fix redirect loop while detect bot