1 min read

[Solution] Redirect Non-WWW to WWW on Bitnami WordPress

Edit this file Change ServerName and ServerAlias to your domain, then Add these lines Then restart apache

Edit this file

/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf

Change ServerName and ServerAlias to your domain,
then Add these lines

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

Then restart apache

sudo /opt/bitnami/ctlscript.sh restart apache
Bitnami Nov 4, 2019