How to fix strange symbols redirect www to non www and force https:// when switch with SSL Sertificate

If you recently decided to switch to SSL sertificate but you see some strange symbols on your website (Opencart, Prestashop and others CMS) this might be causing because of not good redirect especially for font awesome or other special chars symbols.

To fix this problem you can add in the root folder of your website .htaccess file the following lines of code where you replace bolded with the name of your website :

RewriteEngine On
RewriteCond %{HTTP_HOST} ^websitename\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://websitename.com/$1 [R,L]


RewriteCond %{HTTP_HOST} ^www.websitename\.com [NC]
RewriteRule ^(.*)$ https://websitename.com/$1 [R,L]

This will rewrite all urls and redirect all the trafic always to non www. domain with https:// in front so you make sure of two tings – You will always have secured website and second – you will not see those funky special chars on the website.

This is how to easy make the switch from non secured to https:// secured website and preserve website fonts, images and special characters.