Comments

dhtml

Sun 25 Nov, 2018 01:35 pm

Something like this?

   

RewriteEngine On
# enforce no www so that www.africoders.com redirects to https://africoders.com
RewriteCond %{HTTP_HOST} ^www\.africoders\.com [NC]

RewriteRule ^(.*)$ https://africoders.com/$1 [R=301,L]

# enforce ssl redirection ensures that http://africoders.com redirects to https://africoders.com

RewriteCond %{HTTP_HOST} ^africoders\.com [NC]

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://africoders.com/$1 [R=301,L]