CLONES & DOMAINS
Co-hosted clone websites may share a root, web.config & .NET files, `and a landing page. The landing page, if used, does two things:
- Check the URL for a cloned site
- Redirect to a cloned site "home page"
As shown below, the URL (HTTP_HOST) is checked for a matching site/domain:
protected void Page_Load()
{
string pDomain = Request.ServerVariables["HTTP_HOST"];
if (pDomain.IndexOf("aaworcester") > -1) { Response.Redirect(
"https://aaworcester.org/Homepage.aspx?GRP=WAI"); }
elseif (pDomain.IndexOf("district23aa") > -1) { Response.Redirect(
"https://district23aa.org/Homepage.aspx?GRP=District23"); }
elseif (pDomain.IndexOf("aaemassd24") > -1) { Response.Redirect(
"https://aaemassd24.org/Homepage.aspx?GRP=District24"); }
elseif (pDomain.IndexOf("aadistrict26") > -1) { Response.Redirect(
"https://aaDistrict26.org/Homepage.aspx?GRP=District26"); }
elseif (pDomain.IndexOf("Area30Treatment") > -1) { Response.Redirect(
"https://Area30Treatment.org/Homepage.aspx?GRP=A30TC"); }
elseif (pDomain.IndexOf"aaGroup") > -1) { Response.Redirect(
"https://aaGroup.site/aagroup/default.aspx"); }
}
If called, Homepage.aspx configures itself for a named GRP. Or, the redirect may go elsewhere. WAI's shared landing page checks for these co-hosted clone sites:
For group sites (aaGroup.site clones), a landing page (default.aspx or default.html) like that shown above redirects to a clone site, such as:
Note that each aaGroup subdomain folder can have its own landing page, as shown below.
NOTE 1: SMTP Sendmail() requires credentials per clone (or a default is used).
NOTE 2: TreatmentCalendar.aspx.cs (if used) must be tweaked, per clone.
NOTE 3: The root web.config specifies the landing page(s) for co-hosted clones.
###