ApacheModRewriteRule requires leading slash to be explicit
Open
area-middleware
bug
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
seems https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/Rewrite/src/ApacheModRewrite/ApacheModRewriteRule.cs#L24 doesn't use the `AddRewrite()` rule logic to skip the first leading `/` so overall behavior is not httpd mod_rewrite one.
Guess it will need a toggle to mitigate the backward compatibility but can be great to fix it to make it more compatible with httpd.
### Expected Behavior
_No response_
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.