mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: permalinks redirects with relative_url_root
This commit is contained in:
parent
296add56e6
commit
a3b6e3cb97
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue