Skip to content

Instantly share code, notes, and snippets.

@MahdiKarimipour
Created June 24, 2021 23:15
Show Gist options
  • Save MahdiKarimipour/1531c50b2aab726031a73d84b1dd264a to your computer and use it in GitHub Desktop.
Save MahdiKarimipour/1531c50b2aab726031a73d84b1dd264a to your computer and use it in GitHub Desktop.
Basic Example in Url Rewrite
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