ember.js - Remove unnecessary URL parts/parameters -
i've got blog article-urls http://ali.dj/blog/unlimited-fps-in-unity-editor
my old blog had urls this: http://ali.dj/blog/unlimited-fps-in-unity-editor/comment-page1
etc.
when article valid following unnecessary strip out parts , parameters after url.
this http://ali.dj/blog/unlimited-fps-in-unity-editor/comment-page1
or http://ali.dj/blog/unlimited-fps-in-unity-editor/comment-page1?ref=foo
becomes http://ali.dj/blog/unlimited-fps-in-unity-editor
currently i've got catch-all route redirect user error-page
how can strip out unnecessary parts?
here's router.js
use articles:
this.route('blog', { 'path' : 'blog/'}, function() { this.route('post', { 'path' : ':permalink' }) this.route('not-found', { 'path' : 'not-found'}) }); // error routes this.route('not-found', { path : '/not-found'}) this.route('catch-all', { path : '/*path'}) // redirects not-found
Comments
Post a Comment