diff --git a/app/assets/javascripts/discourse/routes/discourse_location.js b/app/assets/javascripts/discourse/routes/discourse_location.js index bb8c55d4367..e01c1d63619 100644 --- a/app/assets/javascripts/discourse/routes/discourse_location.js +++ b/app/assets/javascripts/discourse/routes/discourse_location.js @@ -153,7 +153,12 @@ Ember.DiscourseLocation = Ember.Object.extend({ if (e.state) { var currentState = self.get('currentState'); if (currentState) { - callback(e.state.path); + var url = e.state.path, + rootURL = get(self, 'rootURL'); + + rootURL = rootURL.replace(/\/$/, ''); + url = url.replace(rootURL, ''); + callback(url); } else { this.set('currentState', e.state); }