Answer the question
In order to leave comments, you need to log in
How to make a redirect from http to https (non-standard situation)?
I set up ssl for myself on the first site to try out how it's done.
The site on which I trained was made on Wordpress, where in the settings you can specify how the site url should look like - with http or with https. I did it with https - everything is fine, the engine itself redirects pages.
But there are also static files. For them, you need to make a separate redirect from http or https. I found several instructions for editing htaccess, did it - nothing! I tried 10 different options, nothing works, although the web server does not have any specific settings.
Here is the site itself: https://banochkin.com/ (you can go to banochkin.com and transfer to the https version)
And here is an example of statics: banochkin.com/untitled.html(does not redirect well in any way) I
made edits from here and collected a bunch of different options over the network - nothing helps. Now at the very beginning of the htaccess file there is this code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Answer the question
In order to leave comments, you need to log in
It seems that you have cloudflare (judging by the headlines).
Try this guide - https://support.cloudflare.com/hc/en-us/articles/2...
> I create, promote and maintain websites.
Hmm... =)
And statics, most likely (not visible behind cloudflare), are distributed directly from nginx, so you need to set up a redirect for statics there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question