L
L
lagudal2018-05-24 09:45:36
Digital certificates
lagudal, 2018-05-24 09:45:36

How to properly configure ssl for wordpess located in a subdirectory?

Greetings,
quite often you have to make sketches of sites, and of course, somewhere you need to show these sketches to clients.
Recently, I usually didn’t bother, I put everything in the subpacks of my own website-resume-mini-portfolio - well, it’s normal, in my opinion, I don’t hide anything, here is the structure: my url-projects-your project.
The site itself is simple html, on the apache server. I recently switched everything to https, the whole tree works fine, except for these sites on vorpress, in these subfolders.
Example - a WordPress site in the
.htaccess subfolder of the root

ErrorDocument 403 /404.html
ErrorDocument 404 /404.html
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

.htaccess wp
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /projects/labelfox/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /projects/labelfox/index.php [L]
</IfModule>

# END WordPress

As you can see, a number of resources - pictures and js - are loaded as if via http, but at the same time I absolutely definitely registered them via https, with absolute paths.
What is interesting - you just have to log in to wp - everything starts to glow green happily, everything becomes secure.
Also in the Fox-Blog menu everything is in order.
Apparently something is wrong with the redirects, but I already don’t understand anything, I’ve already tried everything I could find on google on this topic, either without changes, or an endless redirect.
I installed the WordPress HTTPS plugin out of desperation and included its logs in the browser console. It seems to write that some pictures were transferred from http to https, there are no couple of scripts.
In general, you can of course show these sites in subfolders without ssl, but on the other hand, why not set it up if possible?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question