mirror of
https://github.com/discourse/discourse.git
synced 2025-09-11 21:04:42 +08:00
FEATURE: add clean support for running Discourse in a subfolder
To setup set DISCOURSE_RELATIVE_URL_ROOT to the folder you wish
This commit is contained in:
parent
4c4183228f
commit
f5af4768eb
27 changed files with 81 additions and 34 deletions
|
@ -142,7 +142,7 @@ class UsersController < ApplicationController
|
|||
|
||||
def my_redirect
|
||||
if current_user.present? && params[:path] =~ /^[a-z\-\/]+$/
|
||||
redirect_to "/users/#{current_user.username}/#{params[:path]}"
|
||||
redirect_to path("/users/#{current_user.username}/#{params[:path]}")
|
||||
return
|
||||
end
|
||||
raise Discourse::NotFound.new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue