url mapping improvements

This commit is contained in:
sbwalker
2025-04-21 15:14:39 -04:00
parent e0044658f9
commit 4f16cd2d01
6 changed files with 57 additions and 37 deletions

View File

@ -297,7 +297,7 @@
if (urlMapping != null && !string.IsNullOrEmpty(urlMapping.MappedUrl))
{
// redirect to mapped url
var url = (urlMapping.MappedUrl.StartsWith("http")) ? urlMapping.MappedUrl : route.SiteUrl + "/" + urlMapping.MappedUrl;
var url = (urlMapping.MappedUrl.StartsWith("http")) ? urlMapping.MappedUrl : route.SiteUrl + (!urlMapping.MappedUrl.StartsWith("/") ? "/" : "") + urlMapping.MappedUrl + ((!urlMapping.MappedUrl.Contains("?")) ? route.Query : "");
NavigationManager.NavigateTo(url, true);
}
else // no url mapping exists