[BUGFIX beta] Sync router.js, fix index route issues

Fixes #3913
Merge pull request #4196 from machty/route-index

[BUGFIX beta] Sync router.js, fix index route issues