Apache: serving different robots.txt for SSL and non-SSL version of the website

Sometimes, you may want SSL (https://) version of your websites to have different robots.txt than the plain text version (http://).

Here is how to achieve it with Apache webserver: