2

I'm trying to configure Nextcloud + Collabora on a Windows Server. Both applications run in Docker containers. Both are visible to the local machine via HTTP, and I'm setting them up to be visible externally via HTTPS using ARR's reverse proxy. However, Collabora uses URLs with double slashes, e.g.

https://collabora.mydomain/cool/https://nextcloud.mydomain/index.php/apps/richdocuments/wopi/files/11195_ocgyb4pvepal?access_token=***&access_token_ttl=0&permission=edit/ws

Unfortunately, ARR normalizes all URLs, replacing multiple slashes with a single slash. As a result, requests to the Collabora server are invalid (.../https:/collabora.mydomain...). I've tried numerous rules replacing http:/colabora with URL-encoded sequences (%2A%2F%2F), escape sequences (:\/\/), using {UrlEncode} function, etc., but nothing works. Tracing failed requests shows that when any of the rules are applied, ARR decodes and normalizes the URL, replacing the double slash with a single slash, just after applying the rules.

1 Answer 1

0

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

Allow Double Escaping IIS Manager-Request Filtering

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: Lab URL Rewrite Screens

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

Browser Address Bar After URL Rewrite

  • 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.

Bindings in IIS Default Web Site

Canonical Rule 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?

Inbound Rule Modification

Update Nov.13 2025

ARR Server Proxy Configured As Reverse Proxy - Traces

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

enter image description here

Server Proxy Settings - 2

enter image description here

The rest of the trace

3933

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

enter image description here

enter image description here

enter image description here

enter image description here

15
  • I have tried it and it does not work. It is not the RequestFilteringModule that removes double slashes. I have even removed all modules from this site except 4 absolutely necessary (AnonymousAuthentication, ARR, Rewrite and Websocket) but it is ARR module that kills double slashes. I need setting like nocanon from Apache mod_proxy but I don't know if such a thing even exist. Commented Nov 5 at 20:47
  • @Piotr Kubala, I have done some lab tests regarding your rewrite issue and updated my answer. Can you please have a look at the last update? Thanks. Commented Nov 8 at 17:17
  • I'm aware that ARR preserves double slashes in query strings. In fact, Collabora generates URLs with https:// substrings in both the URI-stem and the URI-query, and I've seen double slashes preserved in the query. However, this is Docker-based software, and I can't easily change this. I've found many instructions on how to configure Collabora for reverse proxies like Apache, Nginx, Traefik, and others, but I haven't even found information about IIS+ARR. I don't think anyone has found a working solution. Commented Nov 10 at 7:57
  • 1
    @PiotrKubala, I think I have solved the issue. I have cross-checked from the failed request traces that URL is rewritten as required. I have updated the answer today again. Could you please verify this? Thanks Commented Nov 10 at 9:30
  • I have not received any feedback about whether the solution I have reported in the last update in my answer is OK or not. Additionally, my answer got -1 points and was down-voted even though a technically tough issue is now overcome (needs approval). May I kindly ask the voter or a moderator to review the downvote? I do bot think the anwer deserves -1 score Commented Nov 11 at 15:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.