public RedirectResult RedirectSubdomain(string subdomain) { //check if subdomain is user or network //TODO check if is a network try { UserManager userManager = new UserManager(); User user = userManager.GetUserByProfileURL(subdomain); if (user == null) { string redirectURL = "http://vestn.com"; return Redirect(redirectURL); } else if (user.isPublic == 0) { string redirectURL = "http://vestn.com/#splash=404"; return Redirect(redirectURL); } else { string redirectURL = "http://vestn.com/#profile=" + user.id.ToString(); return Redirect(redirectURL); } } catch (Exception ex) { string redirectURL = "http://vestn.com"; return Redirect(redirectURL); } }
public RedirectResult RedirectSubdomain(string subdomain) { //check if subdomain is user or network //TODO check if is a network try { UserManager userManager = new UserManager(); User user = userManager.GetUserByProfileURL(subdomain); if (user == null) { string redirectURL = "http://50.17.232.163"; return Redirect(redirectURL); } else { string redirectURL = "http://50.17.232.163/#profile=" + subdomain; return Redirect(redirectURL); } } catch (Exception ex) { return Redirect("http://50.17.232.163"); } }