Trying HTTPS first

Hi,
I get from Ken Russell (Google) a question (see below).
How can I make HTTP to HTTPS redirect for my pages?
Shall I use htaccess files?
Evgeny

Hi Evgeny,

Is it possible for you to configure your pages on (ibiblio.org/) to be served up with HTTPS instead of HTTP? Navigating to the top-level (ibiblio.org/) redirects to (https://ibiblio.org/), but for example, typing the following into the Oculus Browser:
www.ibiblio.org/e-notes/webxr/mini.htm

goes to the HTTP version. WebXR is only enabled for HTTPS connections.

I’ve asked the Chromium developers about this:

https://groups.google.com/a/chromium.org/d/topic/chromium-dev/nqoxPY61dIc/discussion

and they suggest the best workaround is to serve up a 301 redirect for http connections, to the https version of the page.

Is this something you can change?

Thanks,

-Ken

Since there was no AllowOverride statement for your e-notes directory, you could not have made the change in a .htaccess. I’ve put the following in the relevant Apache conf file:

<Directory "/public/html/e-notes">
  ## https-only for e-notes. See: https://support.ibiblio.org/t/trying-https-first/103
  RewriteCond %{HTTP:X-Forwarded-Proto} !https
  RewriteCond %{HTTPS} off
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
</Directory>

This should be live across the web cluster now. Because some sites use software that unfortunately builds the protocol in, we cannot do this domain-wide by default at this time without causing disruptive breakage. Thanks for posting your request, as having it public here should make future similar requests simpler and faster to handle.

Thank you very much. All works fine now.

1 Like