Check empty stringfor globalRedirect. It breaks RedirectPermanent.