url rewriting - How to rewritten rule for c# for GET request example.com/123 redirect to example.com/default.aspx?pid=123 and 123 is dynamic change -


this uri http://example.com/xyz xyz number. have redirect http://example.com/default.aspx?pid=xyz

this link should more: https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module.

in iis manager create new rule with:

  • action: redirect
  • pattern: ^([0-9]{3})
  • redirect url: default.aspx?pid={r:1}

if xyz change in length, consider changing pattern to: ^([0-9]+)


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -