Created
September 19, 2018 14:43
-
-
Save geoclaps/c6320e9fe50132052361105b11d4d88e to your computer and use it in GitHub Desktop.
Set Wordpress SSL connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in the functions.php of your theme add: | |
define('FORCE_SSL_ADMIN', true); | |
//in the .htaccess file of the root directory add: | |
<IfModule mod_rewrite.c> | |
RewriteCond %{HTTP_HOST} ^(www\.domeinnaam\.nl|domeinnaam\.nl)$ [NC] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.domeinnaam.nl/$1 [R=301,L] | |
</IfModule> | |
//Go to Wordpress admin > settings and set the url's as https or use a search and replace tool to change http:// to https:// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment