How to put your site into maintainance mode






2.67/5 (3 votes)
How to put your site into maintainance mode
First of all, create an instance of
Uri
object, then check if the URL provided matches with the URL you are having, then redirect it to the new URL.
Uri uri = new Uri("http://www.google.co.uk/index.html"); if(uri.Host.ToLower().EndsWith("google.co.uk")) { //Do something response.redirect("www.newsite.com/maintainance.html"); }Enjoy programming...