Backbone - How to Configure Default Routing for a Site

I want to set default routing for a site.

Cause. I do this, I want to redirect to page not found (page 404) if the user enters an invalid link, or this link that the user enters not in the given routing.

+3


source to share


1 answer


 #not found
    '*notFound' : 'notFound'

      



This should be in the last router object if there are multiple route objects and they are the last option of the route of this route object. Otherwise, it will redirect all pages below this ("* notFound": "notFound") to "notFound".

+3


source







All Articles