There was a small problem with the wordpress engine

There is a website on wordpress engine that is available and works fine on http and https open all pages. Ie full working functionality

I want to make the uniquest.uz website open only via https, so the redirection happens, but all my attempts will not be successful yet

As soon as I register in htaccess

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> 

Internal links stop working on the site, the main page opens normally, how to be, and why this happens.

P / s /

WordPress address (URL) http://uniquest.uz

Website address (URL) http://uniquest.uz

If you put https everything breaks

    3 answers 3

    In order for the WordPress site to work properly on https , you need to do the following:

    1. Enter https both Адрес WordPress (URL) and Адрес сайта (URL) . In your case should be https://uniquest.uz

    2. Replace http:// with https:// in all internal links in the database. This cannot be done as a replacement for the text dump of the database, since in this case the serialized data will be damaged. Best to use DATABASE SEARCH AND REPLACE SCRIPT IN PHP

    3. Put such rules in Apache:

    :

     RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 
    • And then my site will not open on mobile phones, - Anton
    • This is why? My something opens. Well, I don’t give advice from the ceiling - besides my website I also translated many client ones to https - KAGG Design
    • I agree probably with you .... only a question appeared why when the wordpress settings were http, the site worked fine and on https (the only minus was no auto redirection from http to https), but everything worked manually - Anton
    • I do not quite understand what is manually. Somehow WP can work with partially correct configuration. At the same time easily on many pages can be mixed content, etc. If we want everything to be correct, then here is the list above. - KAGG Design
    • manually means all the functionality worked on http and https, but there was no redirect to https. I could manually type the site address with https and it worked fine - Anton

    Rule nginx config. a file that will open a specific site for a specific domain. And also in the WP itself redo the links to support WP

    • What nginx? He has apache - KAGG Design
    • one
      "And also in the WP itself, alter the links to support WP" for these pearls bash cries :) - SeVlad

    All the problem was solved just needed

    WordPress address (URL) http: //*****.uz

    Website address (URL) https: //*****.uz

    and links are also on https:

    • This is not enough - a wider list of actions is needed, as described in my answer - KAGG Design
    • Yes, I agree, some links work with redirection to https and some in the sediment, remain in http - Anton