'.Net 6 RewriteOptions Not Matching File As Expected
I am using RewriteOptions in my .Net 6 app. I am trying to rewrite any file that is requested that starts with the following path
/umbraco/_framework/
To the following
/_framework/
In my StartUp.cs I have the following entry
var options = new RewriteOptions()
.AddRewrite(@"^umbraco\/_framework\/(.*)", "_framework/$1", skipRemainingRules: true);
app.UseRewriter(options);
However, this is not working. If I request this file
/umbraco/_framework/blazor.boot.json
I get a 404, but if I request it without the /umbraco/ (/_framework/blazor.boot.json) it works fine.
What am I missing here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
