add nondir/dir route lookup in controller