Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ private async Task HandleRewritesAsync(HttpContext context, string path, QuerySt
continue;
}

// Extra query string in the template.
queryString = CombineQueryString(queryString, queryStringFromUrl.Value);

var template = await templatesService.GetTemplateAsync(number);
if (template is QueryTemplate { UsedForRedirect: true })
{
Expand Down Expand Up @@ -335,9 +338,6 @@ private async Task HandleRewritesAsync(HttpContext context, string path, QuerySt
queryString = CombineQueryString(queryString, $"?templateid={urlMatchLastPart.Replace("?", "&")}");
}

// Extra query string in the template.
queryString = CombineQueryString(queryString, queryStringFromUrl.Value);

// It is a template.
context.Request.Path = "/template.gcl";
context.Request.QueryString = queryString;
Expand Down