allow users to customize how the redirect url is generated.