//--------------------------------------- public void ProcessRequest(HttpContext context) { /* * // Check to see if the specified HTML file actual exists and serve it if so.. * String strReqPath = context.Server.MapPath(context.Request.AppRelativeCurrentExecutionFilePath); * if (File.Exists(strReqPath)) * { * context.Response.WriteFile(strReqPath); * context.Response.End(); * return; * } * * // Record the original request PathInfo and QueryString information to handle graceful postbacks * context.Items[ORIGINAL_PATHINFO] = context.Request.PathInfo; * context.Items[ORIGINAL_QUERIES] = context.Request.QueryString.ToString(); * * // Map the friendly URL to the back-end one.. * String strVirtualPath = ""; * String strQueryString = ""; * MapFriendlyUrl(context, out strVirtualPath, out strQueryString); * if (strVirtualPath.Length > 0) * { * foreach (string strOriginalQuery in context.Request.QueryString.Keys) * { * // To ensure that any query strings passed in the original request are preserved, we append these * // to the new query string now, taking care not to add any keys which have been rewritten during the handler.. * if (strQueryString.ToLower().IndexOf(strOriginalQuery.ToLower() + "=") < 0) * { * strQueryString += string.Format("{0}{1}={2}", ((strQueryString.Length > 0) ? "&" : ""), strOriginalQuery, context.Request.QueryString[strOriginalQuery]); * } * } * * // Apply the required query strings to the request * context.RewritePath(context.Request.Path, string.Empty, strQueryString); * // Now get a page handler for the ASPX page required, using this context. * Page aspxHandler = (Page)PageParser.GetCompiledPageInstance(strVirtualPath, context.Server.MapPath(strVirtualPath), context); * // Execute the handler.. * aspxHandler.PreRenderComplete += new EventHandler(AspxPage_PreRenderComplete); * aspxHandler.ProcessRequest(context); * } * else * { * // No mapping was found - emit a 404 response. * context.Response.StatusCode = 404; * context.Response.ContentType = "text/plain"; * context.Response.Write("Page Not Found"); * context.Response.End(); * }*/ string newPath = Context.Request.RawUrl; HandleCurrentLanguage(); DCMetaBuilder.InisializeMetaTags(); DCSiteUrls urls = DCSiteUrls.Instance; urls.ReWriteUrl(); }
void context_BeginRequest(object sender, EventArgs e) { string newPath = Context.Request.RawUrl; HandleCurrentLanguage(); DCMetaBuilder.InisializeMetaTags(); DCSiteUrls urls = DCSiteUrls.Instance; urls.ReWriteUrl(); //DCCMSNameSpace.SubSiteHandler.IncreaseSubSiteVisites(); //RewriteUrl(); }