Thursday, 30 July 2015

How to redirect Permanent to given Url

   private void RedirectPermanent(string url)
        {
            HttpContext current = HttpContext.Current;
            current.Response.Clear();
            current.Response.StatusCode = 301;
            current.Response.RedirectLocation = url;
            current.Response.AddHeader("X-SFUM-Redirect", "true");
            current.Response.End();
        }

No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...