Making sure redirects happen at the most nested route