Skip to content

Commit 43c97f0

Browse files
authored
Merge pull request dodyg#241 from yasar11732/3.1-LTS
Update Program.cs
2 parents e5ddf41 + d08f08b commit 43c97f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/rewrite/rewrite-2/src/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void Configure(IApplicationBuilder app)
1414
app.UseRouting();
1515

1616
var options = new RewriteOptions()
17-
.AddRedirect("([/_0-9a-z-]+)+(.*)$", "/?path=$1&ext=$2"); //redirect any path that ends with .html
17+
.AddRedirect("([/_0-9a-zA-Z-]+)\\.([^/]+)$", "/?path=$1&ext=$2"); //redirect any path that ends with .html
1818

1919
app.UseRewriter(options);
2020

@@ -49,4 +49,4 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
4949
webBuilder.UseStartup<Startup>()
5050
);
5151
}
52-
}
52+
}

0 commit comments

Comments
 (0)