We have a server running AEGIR to manage our sites. The back-end server is setup to serve pages in HTTP. Our sites are published through a reverse proxy (Forefront) serving pages in HTTPS to the clients.

If a request is sent in HTTP, Forefront sends a 304 answer, with the correct location (i.e. in HTTPS). Forefront handles the rewriting of http URIs within HTML pages he delivers, so the clients only see HTTPS URIs.

Our problem arises with AJAX, namely the Taxonomy manager module. An AJAX request is sent to the server, and the response is provided in JSON. When looking at the JSON, there are references to the site's URL but with HTTP instead of HTTPS. So the browser sends a request to the server with HTTP instead of HTTPS, and is therefore redirected, but this redirection is rejected by the browser, and the call fails.

Does anybody know how to tell Drupal to always generate references to the site with HTTPS instead of HTTP?

Strangely, the problem is not exactly the same on different sites. In Aegir, I have two sites in the same platform: sites A and B.

For site A, when I look at the JSON answer for an AJAX call I see references http://siteA

For site B, I see in JSON answer references http://siteB:443, so for site B the right port (https) is used, but protocol is wrong

I suppose there is somewhere a place where I can tell the site how to make references to itself. Does anybody know where it is?

I looked in the settings.php of the sites, the global config, ... but didn't find anything relevant.

Any help would be appreciated.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.