Click here to Skip to main content
12,076,206 members (47,402 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

3.3K views
2 bookmarked
Posted

How to put your site into maintainance mode

, 29 Nov 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Denno.Secqtinstien
Technical Lead Erls Corporation
India India
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

You may also be interested in...

Comments and Discussions

 
GeneralReason for my vote of 2 If you have to implement a maintenan... Pin
Marcus Kramer5-Dec-11 9:45
memberMarcus Kramer5-Dec-11 9:45 
GeneralSystem.Uri class (http://msdn.microsoft.com/en-us/library/sy... Pin
Denno.Secqtinstien4-Dec-11 20:16
memberDenno.Secqtinstien4-Dec-11 20:16 
GeneralReason for my vote of 1 totally unscalable Pin
Reiss29-Nov-11 5:47
memberReiss29-Nov-11 5:47 
GeneralYou haven't told us where should we add this code? Pin
Ankur\m/29-Nov-11 4:17
memberAnkur\m/29-Nov-11 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160208.1 | Last Updated 29 Nov 2011
Article Copyright 2011 by Denno.Secqtinstien
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid