Add more flexibility for redirects