• guillermovargasquisoboni

    (@guillermovargasquisoboni)


    Hello everybody,

    I activated an SSL certificate on my website and now I must perform the operations to use it. It seems that there are many different methods to do this and I don’t understand what I really have to do. A list of this methods include: 1. defining a redirection on .htaccess (with variations if you want to redirect the whole network or some specific sites…… that is the one that I need); 2. forcing administratio to use SSL on wp-config.php; 3. modifying all http to https on database; 4. adding a -S on general settings. First question: are this 4 steps optional or complementary?

    I’m in the middle of this process and I have doubts because .htaccess already have some rules that are specifically related to multisites.

    .htaccess for network multisite has the following rules :

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    The rules to redirect from http to https in .htaccess are like these :

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    Or like these:

    RewriteCond% {HTTP_HOST} ^ votresite.com [NC, OR]
    RewriteCond% {HTTP_HOST} ^ www.votresite.com [NC]
    (*). RewriteRule ^ $ https://www.votresite.com/$1 [L, R = 301, NC]

    I don’t really understand what all of this means, so I wonder if it is logic or fine to combine everything in a sequence. It is really necessary to declare two times a “RewriteEngine On”? Do RewriteCond %{REQUEST_FILENAME} and RewriteCond %{HTTPS} or RewriteCond% {HTTP_HOST} could be together in the same file?

    Something similar happens on wp-config, in which some definitions related to multisites are too similar to the ones that are used to switching to https.

    Someone there can give us a step-by-step instruction to switch from http to https on multisites installations?

    Regards !

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Switching from http to https in multisite’ is closed to new replies.