Skip to content

Commit ad1b63c

Browse files
authored
Try to fix infinite redirect bug
1 parent de9b8f8 commit ad1b63c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eng/build/Build.Website.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,9 @@ void CreateRedirectsFromOldWebsiteUrlsToNewWebsiteUrls(AbsolutePath basePath)
247247
continue;
248248
}
249249

250+
Directory.CreateDirectory(dir.Parent / $"{dir.Name}.html");
250251
File.WriteAllText(
251-
dir.Parent / $"{dir.Name}.html",
252+
dir.Parent / $"{dir.Name}.html" / "index.html",
252253
GetRedirect(basePath.GetRelativePathTo(dir).ToString().Replace('\\', '/'))
253254
);
254255
}

0 commit comments

Comments
 (0)