Modified RedirectUrl helper so that the condition can be easily modified