Open djules75 opened 9 years ago
Is there a way / fix to handle this?
this works as a workaround: http://stackoverflow.com/a/27790687/3223028
I'm running into the same issue, I'm not sure I understood the workaround that's for redirect on user login in not for incorrect / missing route
@miri-am thx for posting this workaround!
@almogdesign It works like this:
notFoundTemplate
setting from Router.configure
Router.route('/(.*)', function() {//regex for every route, must be last
if (this.ready()) {
document.title = "404";
this.render('error');
} else this.render('loading');
})
Thanks this worked
Application works fine without appcache. After adding appcache (meteor add appcache), Iron Router sends the app in a redirect loop for missing routes instead of showing the notFoundTemplate (it works fine for existing routes).
For example, the navigation bar ends up in a loop with "http://127.0.0.1/idontexist" alternating with "http://127.0.0.1/#!idontexist".
I managed to reproduce the issue. Create a new app (meteor v1.0.3.1):
app.js:
app.html
Result: 127.0.0.1:3000/ok : works with or without appcache all other routes show the appNotFound template without appcache, or end up in a redirect loop if appcache is installed