redirect detection