Created
June 24, 2021 23:15
-
-
Save MahdiKarimipour/1531c50b2aab726031a73d84b1dd264a to your computer and use it in GitHub Desktop.
Basic Example in Url Rewrite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.Use(async (context,next) => | |
{ | |
var url = context.Request.Path.Value; | |
if (url.Contains("/home/old-url")) { | |
context.Request.Path = "/home/new-url"; | |
} | |
await next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment