private void CheckFor301(string slug) { MerchantTribe.Commerce.Content.CustomUrl url = MTApp.ContentServices.CustomUrls.FindByRequestedUrl(slug); if (url != null) { if (url.Bvin != string.Empty) { if (url.IsPermanentRedirect) { Response.RedirectPermanent(url.RedirectToUrl); } else { Response.Redirect(url.RedirectToUrl); } } } }
private void CheckFor301(string slug, MerchantTribe.Commerce.MerchantTribeApplication app) { MerchantTribe.Commerce.Content.CustomUrl url = app.ContentServices.CustomUrls.FindByRequestedUrl(slug); if (url != null) { if (url.Bvin != string.Empty) { if (url.IsPermanentRedirect) { app.CurrentRequestContext.RoutingContext.HttpContext.Response.RedirectPermanent(url.RedirectToUrl); } else { app.CurrentRequestContext.RoutingContext.HttpContext.Response.Redirect(url.RedirectToUrl); } } } }