'Redirect all equivalent HTTP traffic to ssl_vhost.
Add rewrite directive to non https traffic
.. note:: This function saves the configuration
:param str domain: domain to enable redirect for
:param unused_options: Not currently used
:type unused_options: Not Available'

def _enable_redirect(self, domain, unused_options):

    port = self.DEFAULT_LISTEN_PORT
    vhost = None
    vhost = self.choose_redirect_vhost(domain, port)
    if (vhost is None):
        logger.info('No    matching    insecure    server    blocks    listening    on    port    %s    found.', self.DEFAULT_LISTEN_PORT)
    elif self._has_certbot_redirect(vhost):
        logger.info('Traffic    on    port    %s    already    redirecting    to    ssl    in    %s', self.DEFAULT_LISTEN_PORT, vhost.filep)
    elif vhost.has_redirect():
        if (not self._has_certbot_redirect_comment(vhost)):
            self._add_redirect_block(vhost, active=False)
        logger.info('The    appropriate    server    block    is    already    redirecting    traffic.    To    enable    redirect    anyway,    uncomment    the    redirect    lines    in    %s.', vhost.filep)
    else:
        self._add_redirect_block(vhost, active=True)
        logger.info('Redirecting    all    traffic    on    port    %s    to    ssl    in    %s', self.DEFAULT_LISTEN_PORT, vhost.filep)
