Umbraco Razor C# Hide a site from Search engies and Visitors while it is in development


If you are working on a site that is on a live server and has the live url, you could create a page on another site with a link on it that directs to your development site.

Give your client, or whoever you want to see the development site a link to that page.  When they click the link they will be able to see the actual live website.  Without the link they are redirected to a "under development" page.



    var myReferrer = Request.UrlReferrer;
   
    string thisString = "" + myReferrer;
   
     if (thisString == null  || thisString == ("www.A-PAGE-ON-ANOTHER-SITE-WITH-A LINK.html") || Session["legit"] == "yes" )
        {
       
            Session["legit"] = "yes";
        }
    else
        {
           Response.Redirect("http://THE-DEVELOPMENT-SITE.com/my-page.html");
        }
   

Comments

Popular posts from this blog

Umbraco - Reset the Admin Password via SQL Server

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco

Umbraco Macro for IFrame when Embedding Video, Vimeo Universal Player, or other types of IFrame on to a Page XSLT version and Razor Version