I have Let's Encrypt SSL
certificate for exampledomain.com. www.exampledomain.com redirects to https://exampledomain.com, but exampledomain.com gives “Apache2 Ubuntu Default Page”. I tried to redirect it with following code in .htaccess
file. First section was added by WordPress installer automatically.
.htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.exampledomain.com/$1 [R,L]