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);
             }
         }
     }
 }
예제 #2
0
 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);
             }
         }
     }
 }