R
R
Ruslan Banochkin2016-07-04 15:09:03
Digital certificates
Ruslan Banochkin, 2016-07-04 15:09:03

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]


But he, as said above, does not help.

How to be? Before that, I did various redirects through htaccess - everything worked well. And here for more than a day I can not understand what's wrong.

Oh yes. The site is connected to cloudflare.com , but now it's in developer mode, all the cache has been reset and the redirect still doesn't work. Everything works on the Vesta panel.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-07-04
@alsopub

It seems that you have cloudflare (judging by the headlines).
Try this guide - https://support.cloudflare.com/hc/en-us/articles/2...

V
Vlad Zhivotnev, 2016-07-04
@inkvizitor68sl

> 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 question

Ask a Question

731 491 924 answers to any question