Redirect to a specific URL after submission based on conditions.