From a3b6e3cb975ac63393beb8a1d3322fb389fb7a5e Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Sun, 19 Apr 2015 23:35:53 -0400 Subject: [PATCH] FIX: permalinks redirects with relative_url_root --- app/controllers/permalinks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/permalinks_controller.rb b/app/controllers/permalinks_controller.rb index c32b88e96c2..3b243d955ee 100644 --- a/app/controllers/permalinks_controller.rb +++ b/app/controllers/permalinks_controller.rb @@ -5,7 +5,7 @@ class PermalinksController < ApplicationController url = request.fullpath[1..-1] permalink = Permalink.find_by_url(url) if permalink && permalink.target_url - redirect_to permalink.target_url, status: :moved_permanently + redirect_to "#{Discourse::base_uri}#{permalink.target_url}", status: :moved_permanently else raise Discourse::NotFound end