Solved Apache Rewrite to https does not seem to work
-
I have set up a web server and use Apache's RewriteRule to rewrite http URLs to https. It works with all other browsers I have tried. But I noticed that it does not work with Vivaldi.
How is that possible? Can anyone confirm this?
-
@fleupold Hello and welcome to the Vivaldi Community
How does your rewrite rule look?
Do you have an example URL?I'm sure someone here has an Apache to test with. There should be no reason why Vivaldi handles it differently, but rewrite rules are complex and easy to make mistakes.
-
@pathduck Thanks for looking into this.
The rules are:
RewriteEngine on RewriteCond %{SERVER_PORT} 80 RewriteRule ^ https://%{HOST_NAME}%{REQUEST_URI} [END,NE,R=301]
An example to test would be
<redacted>
I also don't know why Vivaldi would be different. But I have tried this on other freshly installed browser, and on them the URL does get replaced in the address bar and the https version of the site is loaded.
-
@fleupold That URL just returns a 400 Bad Request in all browsers as well as Curl.
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.$ curl -I <redacted> HTTP/1.1 400 Bad Request Date: Wed, 16 Feb 2022 12:10:21 GMT Server: Apache/2.4.41 (Ubuntu) Strict-Transport-Security: max-age=15552000; Content-Length: 435 Connection: close Content-Type: text/html; charset=iso-8859-1
Your server is listening with TLS/SSL on port 80, this is clearly not intended.
-
Thanks again. You have actually helped me improve my server's settings. Everything seems to work fine now.
I'm still puzzled why all other browsers behaved differently, and only Vivaldi reacted properly. Sorry for attributing to a potential bug.
PS. I would actually like to remove my URL from this conversation. Could you maybe blur or redact your screenshot? Thanks!!
-
@fleupold said in Apache Rewrite to https does not seem to work:
I'm still puzzled why all other browsers behaved differently, and only Vivaldi reacted properly.
Maybe because the old (working) site was cached in the other browser? Hard to say. Always remember to use force reload when testing web sites (Ctrl+F5).
I've removed the URLs.
-
Ppafflick marked this topic as a question on
-
Ppafflick has marked this topic as solved on
-
Ppafflick moved this topic from Vivaldi for macOS on