with my WordPress-Blog, I switch to https. Therefore, I have add the following code to my .htaccess-File. My Problem now is, that I get the issue "Too many Redirects". Thank you for your tips!
Domain is a Subdomain:
https://en.example.com
# Begin Force SSL
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
# End Force SSL
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Log into your WordPress dashboard ang go to Settings > General. Scroll down to the WordPress and Site URL Address field and replace the HTTP with HTTPS.
Note: If your site is hosted on our Managed WordPress hosting platform you do not need to manually change these settings, the HTTPS protocol will be configured automatically.
Make sure that you define the WP_SITEURL and WP_HOME at wp-config.php
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
And add this condition to check if the https at wp-config.php
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With