The reason for the malfunctioning redirects is that the character immediately after "REDIRECT" is not an ordinary space, but a "non-breaking space", hex code 0xA0.  Out of curiosity: how did you manage to create them?