Skip to content

Commit 498b471

Browse files
committed
updated to RC3
1 parent 1ed0c15 commit 498b471

File tree

9 files changed

+45
-17
lines changed

9 files changed

+45
-17
lines changed

YAF.Website/IISUrlRewrite.xml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
<rewrite>
22
<rules>
3-
<rule name="Forum to Forums" stopProcessing="true">
4-
<match url="forum/(.*)" />
5-
<action type="Redirect" url="forums/{R:1}" redirectType="Permanent" />
6-
</rule>
7-
<rule name="RegisterV2" stopProcessing="true">
8-
<match url="RegisterV2\.asmx" />
9-
<action type="Redirect" url="https://yetanotherforum.net" redirectType="Permanent" />
10-
</rule>
3+
<rule name="forum posts" stopProcessing="true">
4+
<match url="forum/posts/t([0-9]+)-((.+))?(\?(.+))?$" />
5+
<action type="Redirect" url="/forums/Posts/{R:1}/{R:3}" redirectType="Permanent" />
6+
</rule>
7+
<rule name="forum post" stopProcessing="true">
8+
<match url="forum/posts/m([0-9]+)-((.+))?(\?(.+))?$" />
9+
<action type="Redirect" url="/forums/Post/{R:1}/{R:3}" redirectType="Permanent" />
10+
</rule>
11+
<rule name="forum account" stopProcessing="true">
12+
<match url="forum/Account/(.*)" />
13+
<action type="Redirect" url="forums/Account/{R:1}" redirectType="Permanent" />
14+
</rule>
15+
<rule name="forum topics" stopProcessing="true">
16+
<match url="forum/topics/([0-9]+)-((.+))?(\?(.+))?$" />
17+
<action type="Redirect" url="/forums/Topics/{R:1}/{R:3}" redirectType="Permanent" />
18+
</rule>
19+
<rule name="default.aspx" stopProcessing="true">
20+
<match url="default.aspx" />
21+
<action type="Redirect" url="/" redirectType="Permanent" />
22+
</rule>
1123
</rules>
1224
</rewrite>

YAF.Website/Pages/Downloads.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Pages/Error.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Pages/Features.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Pages/Index.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Pages/Key.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Pages/MigrationTool.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Yet Another Forum.NET
22
* Copyright (C) 2003-2005 Bjørnar Henden
33
* Copyright (C) 2006-2013 Jaben Cargman
4-
* Copyright (C) 2014-2023 Ingo Herbote
4+
* Copyright (C) 2014-2024 Ingo Herbote
55
* https://www.yetanotherforum.net/
66
*
77
* Licensed to the Apache Software Foundation (ASF) under one

YAF.Website/Startup.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,19 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
108108
app.UseHsts();
109109
}
110110

111+
app.Use(async (context, next) =>
112+
{
113+
var path = context.Request.Path.ToString();
114+
115+
if (path.Contains("/RegisterV", StringComparison.InvariantCultureIgnoreCase))
116+
{
117+
context.Response.StatusCode = 500;
118+
return;
119+
}
120+
121+
await next();
122+
});
123+
111124
app.RegisterAutofac();
112125

113126
app.UseAntiXssMiddleware();
@@ -118,12 +131,15 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
118131
app.UseRewriter(options);
119132
}
120133

121-
app.UseStaticFiles();
134+
app.UseStaticFiles();
122135

123136
app.UseSession();
124137

125138
app.UseYafCore(this.ServiceLocator, env);
126139

140+
app.UseRobotsTxt(env);
141+
142+
127143
app.UseEndpoints(endpoints =>
128144
{
129145
endpoints.MapRazorPages();

YAF.Website/YAF.Website.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<ItemGroup>
2828
<PackageReference Include="Octokit" Version="13.0.1" />
2929
<PackageReference Include="SimdLinq" Version="1.3.2" />
30-
<PackageReference Include="YAFNET.Data.SqlServer" Version="4.0.0-rc02" />
31-
<PackageReference Include="YAFNET.RazorPages" Version="4.0.0-rc02" />
30+
<PackageReference Include="YAFNET.Data.SqlServer" Version="4.0.0-rc03" />
31+
<PackageReference Include="YAFNET.RazorPages" Version="4.0.0-rc03" />
3232
</ItemGroup>
3333

3434
<ItemGroup>

0 commit comments

Comments
 (0)