Iron Router 404 redirect to main page


Probably this is simple think, but I wasn’t able to find a solution. So I don’t want to have 404 page, but when user type some incorrect url he should be redirected to the main (/) page. Probably somebody knows how to implement it?


To be honest, I’ve found a solution for it, but it looks not pretty good.
So, first of all I’ve created template notFound and assigned for it rendered callback what’s doing the redirect. Also added to iron router configuration mapping to this template. Actually, this works, but it seems little bit hacky for me.