SSL and redirect

SSL and redirect

SSL and redirect


Now where is ported to a WordPress blog, and everything about it is new, there were still an unfinished task – which was SSL. I’m a big fan of security, and although there is no real need to run this site encrypted, I would still have to log in to the control panel, hence using administrative credentials on a non-encrypted connection.

This site is currently hosted at, and they offer a free wildcard certificate for their customers hosted websites. You cannot download the certificate nor upload your own – it is provided by and it is just a few steps in the control panel then wait about an hour, and the site is capable of running https.


About half an hour later and sure enough https was active on port 443 with a trusted certificate. Unfortunately, nobody will write the complete URL including https when they access a website. I contacted the support team at, and asked if there is a possibility to implement redirect from http to https, but they didn’t offer that service.

Next step? Google! 🙂 It should be possible to create redirects using the .htaccess file, which is a configuration file. This file can be used for various things including authentication and the good thing about this file is, it is directory based so you could implement different rules on every directory.

I’ve put the following in the .htaccess file in the directories where I wanted redirection from http to https.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

More information about RewriteCond and RewriteRule