Changeset 12
- Timestamp:
- 01/07/07 23:57:58 (2 years ago)
- Files:
-
- branches/release-1.0.0/ClassLibrary/UrlHelper.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-1.0.0/ClassLibrary/UrlHelper.cs
r3 r12 22 22 public static string GetRelativeSiteRoot() 23 23 { 24 if ("/".Equals(HttpContext.Current.Request.ApplicationPath)) 25 { 26 return String.Empty; 27 } 24 28 return HttpContext.Current.Request.ApplicationPath; 25 29 } … … 39 43 Protocol = "https://"; 40 44 41 string sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port + HttpContext.Current.Request.ApplicationPath; 45 string sOut; 46 if ("/".Equals(HttpContext.Current.Request.ApplicationPath)) 47 { 48 sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port; 49 } 50 else 51 { 52 sOut = Protocol + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port + HttpContext.Current.Request.ApplicationPath; 53 } 54 42 55 return sOut; 43 56 }
