Fixed; HostedHeader mode disabled creates wrong bindings, dns records when
creating instant alias
This commit is contained in:
parent
3052a9031a
commit
8f694e0756
2 changed files with 63 additions and 12 deletions
|
@ -2495,10 +2495,20 @@ namespace WebsitePanel.EnterpriseServer
|
|||
instantAlias = GetDomainItem(instantAliasId);
|
||||
}
|
||||
|
||||
string parentZone = domain.ZoneName;
|
||||
if (string.IsNullOrEmpty(parentZone))
|
||||
{
|
||||
DomainInfo parentDomain = GetDomain(domain.DomainId);
|
||||
parentZone = parentDomain.DomainName;
|
||||
}
|
||||
|
||||
|
||||
if (domain.WebSiteId > 0)
|
||||
{
|
||||
WebServerController.AddWebSitePointer(domain.WebSiteId,
|
||||
(domain.DomainName.Replace("." + domain.ZoneName, "") == domain.ZoneName) ? "" : domain.DomainName.Replace("." + domain.ZoneName, ""),
|
||||
((domain.DomainName.Replace("." + parentZone, "") == parentZone) |
|
||||
(domain.DomainName == parentZone))
|
||||
? "" : domain.DomainName.Replace("." + parentZone, ""),
|
||||
instantAlias.DomainId);
|
||||
}
|
||||
|
||||
|
@ -2507,12 +2517,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
List<DomainInfo> domains = GetDomainsByDomainItemId(domain.DomainId);
|
||||
foreach (DomainInfo d in domains)
|
||||
{
|
||||
|
||||
if (d.WebSiteId > 0)
|
||||
{
|
||||
WebServerController.AddWebSitePointer(d.WebSiteId,
|
||||
(d.DomainName.Replace("." + domain.ZoneName, "") == domain.ZoneName) ? "" : d.DomainName.Replace("." + domain.ZoneName, ""),
|
||||
((d.DomainName.Replace("." + parentZone, "") == parentZone) |
|
||||
(d.DomainName == parentZone))
|
||||
? "" : d.DomainName.Replace("." + parentZone, ""),
|
||||
instantAlias.DomainId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue