Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am writing a httpmodule for umb 7.2But i only want it to take action on the frontende of the website, not when in the backend.
Any ideas?
private void Application_BeginRequest(Object source, EventArgs e) { HttpApplication application = (HttpApplication)source; HttpContext context = application.Context; string UrlReferrer = context.Request.UrlReferrer.GetLeftPart(UriPartial.Authority).Replace("https://", "").Replace("http://", ""); bool doRedirect = false; if (System.Configuration.ConfigurationManager.AppSettings["domain.redirectToCaseFromUrls"] != null) { if (System.Configuration.ConfigurationManager.AppSettings["domain.redirectToCaseFromUrls"].ToString() != "") { string[] refs = System.Configuration.ConfigurationManager.AppSettings["domain.redirectToCaseFromUrls"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string item in refs) { if (item.IndexOf(UrlReferrer) >= 0) { doRedirect = true; } } } }}
Could you simply check if the request URL starts with "/umbraco"?
dohh, why didnt i think of this?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
httpmodule disable for backend
I am writing a httpmodule for umb 7.2
But i only want it to take action on the frontende of the website, not when in the backend.
Any ideas?
Could you simply check if the request URL starts with "/umbraco"?
dohh, why didnt i think of this?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.