Cum instalez un certificat SSL pe un site ce ruleaza pe platforma Wordpress?
2018-04-05 13:52Accesati Admin-ul Wordpress apoi meniul Setari -> Generale, Modificati Adresă WordPress (URL) si Adresă sit (URL), sa fie cu HTTPS.
In cazul in care aceste setari nu sunt suficiente creati un fisier .htaccess in directorul de instalare al wordpress cu urmatorul continut:
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !on [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
In cazul in care fisierul .htacces exista deja adaugati doar cele doua linii:
RewriteCond %{ENV:HTTPS} !on [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
dupa linia RewriteBase /
Un exemplu ar fi:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !on [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress