On the related website in IIS Manager, click 'Request Filtering' then 'Edit Feature Settings'. Then check the 'Allow Double Escaping' box as follows:

I have tried, for example, https://localhost//ecp with 'Double-Escaping' unchecked, which gives me a 404 error.
Then I checked 'Double-Escaping' and in the browser, https://localhost//ecp worked with the redirection as expected. Regards.
UPDATE: Nov 8. 2025
I have tried to set up a lab with your domain names, Collabora.mydomain and Nextcloud.mydomain which correspond to localhost in hosts file for the purpose of this lab.
My notes on the lab tests until now:
URL Rewrite Module in any way does not allow double forward slashes in URLs,
I have set up a reverse proxy rule and a canonical name rule from templates and the resulting rule screen is:

During tests I have managed to change the input URL address from collabora.mydomain to nextcloud.mydomain browser address bar as follows:

- Host headers for both domains should exist in the website bindings
In IIS Manager, otherwise you will not be able to define the Canonical Name rule from the template.


If you can modify your URL Parts such that the second "https://.." string in the URL is considered as a query string, such as /cool?redir=https://..., then another rule will parse and modify the URL and query part as required. In the lab tests, I have seen the query part is not modified by URL Rewrite.
Example:
https://collabora.mydomain/cool?redir="https://nextcloud.mydomain/cool", the two forward slashes in the query string is preserved during URL Rewrite, I have verified it.
I hope these tests will help you to clarify the solution roadmap of this issue. Regards.
UPDATE Nov.10 2025
I have resolved the issue by using the following additional server variable, X2, which saves the original, unencoded URL and then rewrites the URL to that value. Could you please verify?

Update Nov.13 2025

As seen in the traces above, X2 - a server variable that I have set the name randomly - is assigned to a special system variable, which holds the original URL as entered, and saves it before further processing and rewrites it again to that value at the end of the process. The web browser address bar shows that the double-forward slash is preserved at the end, even though the ARR-Rewrite Modules have changed it in the middle of the process. ARR uses URL Rewrite for URL modifications.
I hope that this information will help some of the readers who deal with such rewriting issues.
Update Nov.16, 2025
Server Proxy Settings-1

Server Proxy Settings - 2

The rest of the trace

UPDATE: Nov, 17 2025 Traces and Rule Screens With a Server Farm:



