FIX: permalinks redirects with relative_url_root
This commit is contained in:
parent
296add56e6
commit
a3b6e3cb97
|
@ -5,7 +5,7 @@ class PermalinksController < ApplicationController
|
||||||
url = request.fullpath[1..-1]
|
url = request.fullpath[1..-1]
|
||||||
permalink = Permalink.find_by_url(url)
|
permalink = Permalink.find_by_url(url)
|
||||||
if permalink && permalink.target_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
|
else
|
||||||
raise Discourse::NotFound
|
raise Discourse::NotFound
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue