{
   my $status = $bandwidthd{'status'} || "disabled";
   return "    # bandwidthd is disabled in this VirtualHost"
           unless $status eq 'enabled';
   $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ?  'yes' : 'no';

if (($port ne "443") && ($haveSSL eq 'yes') )
	{
	$OUT .= "RewriteEngine on\n";
	$OUT .= "    RewriteRule ^/bandwidthd(/.*|\$)    https://%{HTTP_HOST}/bandwidthd\$1 [L,R]\n";
        $OUT .= "    RewriteRule ^/bandwidthd-php(/.*|\$)    https://%{HTTP_HOST}/bandwidthd-php\$1 [L,R]\n";
        $OUT .= "    RewriteRule ^/bandwidthd-static(/.*|\$)    https://%{HTTP_HOST}/bandwidthd-static\$1 [L,R]\n";
    if (exists $bandwidthd{'URL'})
       { $OUT .= "    RewriteRule ^/$bandwidthd{'URL'}  https://%{HTTP_HOST}/$bandwidthd{'URL'}\$1 [L,R]\n"; }
	}
}
