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"))
{
response.redirect("www.newsite.com/maintainance.html");
}
Enjoy programming...