anchor.diff:                                             false ->
                                                  "http"
                                          end,
  -                    {handled, redirect(ProtocolAsString, Hostname, ReqData)};
  +                    {handled, redirect(true, ProtocolAsString, Hostname, ReqData)};
                   no_host_match ->
                       {{no_dispatch_match, undefined, undefined}, ReqData}
               end,
  
positive.code:         {ok, Remainder, NewBindings, Depth} ->
              case {proplists:get_value(ssl, Props), IsSSL} of
                  {undefined, true} ->
                      Port = z_config:get(listen_port),
                      %Host1 = set_port(Port, HostAsString),
                      {Host1, _Port} = split_host(HostAsString),
                      {redirect, "http", Host1};
                  {false, true} ->
                      Port = z_config:get(listen_port),
                      %Host1 = set_port(Port, HostAsString),
                      {Host1, _Port} = split_host(HostAsString),
                      {redirect, "http", Host1};            
                  {true, false} ->
                      Port = z_config:get(listen_port_ssl),
                      %Host1 = set_port(Port, HostAsString),
                      {Host1, _Port} = split_host(HostAsString),
                      {redirect, "https", Host1};
  
negative.code:                     IsSSL = wrq:is_ssl(RDHost),
                      case wm_dispatch(IsSSL, HostAsString, Host, PathAsString, DispatchList) of
                          {redirect, ProtocolAsString, Hostname} ->
                              {handled, redirect(false, ProtocolAsString, Hostname, ReqData)};
                          {no_dispatch_match, UnmatchedPathTokens} ->
                              {{no_dispatch_match, Host, UnmatchedPathTokens}, RDHost};
                          {DispatchName, Mod, ModOpts, PathTokens, Bindings, AppRoot, StringPath} ->
  