visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.68k stars 688 forks source link

root wildcard looping #385

Closed made-by-chris closed 8 years ago

made-by-chris commented 8 years ago

Hi there, I'm building a service which has dynamic root routes eg. /a, /b, /c As the routes are not predefined, I can only be as specific as this:

page('/*', function(e){
  page.redirect('URL that was clicked')
});

However this triggers a cyclical hit on the wildcard root route as the new routes (/a) satisfy the /*wildcard. Sorry if I missed it in the documentation, but is there a way of preventing the endless redirect? Thanks,