localhost detection for redirect