I have an application hosted in IIS with using Asp.net MVC 5
In this project there are pages with classic mvc pattern also exists api endpoints written by .Net WebApi.
I want to change subdomain of the website to another, and redirect all requests (api requests and page view requests) without losing request bodys, headers, credentials.
I want to redirect request with all parameters and headers from old.example.com to new.example.com
I tried to use IIS HTTPRedirect module, but i am losing http request bodys for api requests after redirection
Here is the web.config addition that i make to redirect, but it doesnt work for webapi requests, the request body is not transferred to new subdomain.
<httpRedirect enabled="true" destination="https://new.example.com$S$Q" exactDestination="true" childOnly="false" httpResponseStatus="Temporary" />
How can i solve this issue ?