There was an error while loading. Please reload this page.
1 parent 24e8831 commit d08f08bCopy full SHA for d08f08b
projects/rewrite/rewrite-2/src/Program.cs
@@ -14,7 +14,7 @@ public void Configure(IApplicationBuilder app)
14
app.UseRouting();
15
16
var options = new RewriteOptions()
17
- .AddRedirect("([/_0-9a-z-]+)+(.*)$", "/?path=$1&ext=$2"); //redirect any path that ends with .html
+ .AddRedirect("([/_0-9a-zA-Z-]+)\\.([^/]+)$", "/?path=$1&ext=$2"); //redirect any path that ends with .html
18
19
app.UseRewriter(options);
20
@@ -49,4 +49,4 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
49
webBuilder.UseStartup<Startup>()
50
);
51
}
52
-}
+}
0 commit comments