about summary refs log tree commit diff stats
path: root/internal/server
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index 21c7743..9c7b907 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -200,7 +200,7 @@ func New(runtimeConfig *Config, log *log.Logger) (*Server, error) {
 					http.StatusMovedPermanently,
 				)
 			case re.MatchString(r.Host):
-				url := config.BaseURL
+				url := config.BaseURL.JoinPath()
 				url.Host = re.ReplaceAllString(r.Host, replace)
 				http.Redirect(w, r, url.String(), http.StatusTemporaryRedirect)
 			case true: