AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Does the Rewrite middleware support conditions?
I would love to Add a rewrite rule that will apply one a condition is met. Is this possible?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 7f5f7c61-a9fa-bd34-001d-217477874bb6
- Version Independent ID: 9c48da92-af90-3fc1-fde0-c3f74fa88510
- Content: URL Rewriting Middleware in ASP.NET Core
- Content Source: aspnetcore/fundamentals/url-rewriting.md
- Service: asp.net-core
- GitHub Login: @guardrex
- Microsoft Alias: riande
If using a RegEx on the incoming path or IIS Rewrite Module (or Apache mod_rewrite) rule doesn't meet your needs, you can set up an IRule-based rule and apply any special conditions that you like.
Awesome, thanks!