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...
I am Dinesh kumar Choudhary by Name, a software Designer and Developer by Work, a Indian Hindu by Religion, Co-Founder of DSFoundation located at http://dsfoundation.wordpress.com by profession, a Loving husband and a Caring Father by Relation.
I have a blog Website at http://dennosecqtinstien.wordpress.com. DSFoundation is the Autonomous body to serve for the management of Local shops located at New Delhi, India. Now a days DSFoundation and its subsidiaries are managed by Erls Corporation, an Another initiative by me and my colleagues, in which i am the another CO-Founder of the Organization. Erls Corporation can be located at http:erlsindia.co.in