Hello,
This can be done by using the
"Custom Properties" tab of your web site added in "IIS" page. However, please note that these settings will be applied only for IIS 7 or newer versions. On machines with an older IIS version these settings will be ignored.
Here are the steps to proceed:
1. go to "Custom Properties" tab and add two new attribute values like this:
- Section: system.webServer/httpRedirect
Name: enabled
Type: boolean (True/False)
Value: True
Section: system.webServer/httpRedirect
Name: destination
Type: string
Value: <desired URL>
2. in order to be configured the above settings require the "HTTP Redirection" IIS subfeature to be installed on target machines; therefore you can add in "Prerequisites" page a Windows Feature Bundle which will install the "HTTP Redirection" IIS subfeature (you can use the Filter box from the tope right section of the page to search for the "HTTP Redirection")
3. build and test the project
If you have any questions let us know.
All the best,
Daniel