In some questions you always want a backslash in your HTTP request, you can easily do that with IIS rewrite rules
First you need to identify if incoming request does not contain an ending slash, that can be done by the following regex. We are only focusing on a special incoming pattern like api/a/b etc
if true redirect attach a slash with it.
Add some conditions so that there is no infinite loop
The entire code will look like following (Add the following code in your Web.Config in System.WebServer)
No comments:
Post a Comment