extended stripTargetUrl function in HitManager