Fine tune the redirect() support in plugins.