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…

Advertisements

40 responses to this post.

  1. Posted by Nakshtra Choudhary on March 9, 2012 at 4:30 pm

    this can be done using a offline.html file putted inside your deployment directory.

  2. I really like your writing style, wonderful information, thankyou for posting : D.

  3. Hello there, I discovered your website by the use of Google at the same time as searching for a comparable topic, your website got here up, it seems to be good. I have bookmarked it in my google bookmarks.

  4. With the whole thing which seems to be developing within this particular subject material, many of your points of view tend to be rather stimulating. Nevertheless, I appologize, because I can not subscribe to your whole suggestion, all be it exciting none the less. It appears to me that your commentary are actually not completely rationalized and in actuality you are your self not completely certain of your point. In any case I did appreciate reading it.

  5. I have to express appreciation to this writer just for bailing me out of this crisis. After checking throughout the world wide web and coming across concepts that were not powerful, I assumed my life was done. Existing without the answers to the difficulties you’ve resolved by means of your good site is a critical case, as well as the ones that might have adversely damaged my career if I had not come across your website. That competence and kindness in handling almost everything was invaluable. I’m not sure what I would have done if I hadn’t come across such a step like this. I can also at this time look ahead to my future. Thank you very much for the professional and effective help. I won’t think twice to refer your blog to anybody who will need tips about this subject.

  6. Hi there very cool website!! Guy .. Beautiful .. Superb .. I’ll bookmark your web site and take the feeds additionally…I am glad to find numerous useful information right here in the post, we’d like work out extra techniques on this regard, thank you for sharing. . . . . .

  7. I don’t consider myself a big thinker, but your article has triggered my thought processes. Thank you for your great content. I truly appreciate it.

  8. Hi, i believe that i noticed you visited my web site so i came to “go back the prefer”.I’m attempting to find things to improve my web site!I suppose its adequate to make use of some of your ideas!!

  9. I enjoyed your wonderful words. awesome information. I hope you produce more. I will continue subscribing

  10. Very interesting info!Perfect just what I was searching for!

  11. It truly is excellent that your web-site has a community that would not feel the need to yell “FIRST” everytime they see a new article.

  12. Awesome website…

    […]the time to read or visit the content or sites we have linked to below the[…]……

  13. I hope to kick the smoking, which causes death

  14. I loved the use of typography in Nicola Potts inspiring! Many thanks for this list.

  15. Brian Hoff’s web site and average day is exceptionally similar to mine. The only difference is mine says a internet developer’ rather than Im a designer’.

  16. It is evident by this post that advancements in medical technology are very essential if we want to save more human lives. Many thanks for providing such up to date information.

  17. You need to really control the commentary listed here

  18. Im having a little problem. I cant get my reader to pick-up your feed, Im using google reader by the way.

  19. When I originally commented I clicked the Notify me when new comments are added checkbox and now each time a remark is added I get 4 emails with the same comment.

  20. Could you email me with a few pointers on how you made your blog look this awesome, I would be appreciative.

  21. It seems to me that this website doesnt load up on a Motorola Droid. Are other people having the same problem? I like this site and dont want to have to skip it any time Im gone from my computer.

  22. While I really like this post, I believe there was an spelling error close to the finish from the third sentence.

  23. I Am Going To have to visit again whenever my course load lets up – nevertheless I am taking your Feed so i can read your blog offline. Cheers.

  24. An interesting post right there mate ! Thanks for the post !

  25. The design for your web site is a bit off in Epiphany. Even So I like your site. I might have to install a normal web browser just to enjoy it.

  26. It appears to me that this website doesnt download on a Motorola Droid. Are other folks getting the same issue? I enjoy this webpage and dont want to have to skip it whenever Im away from my computer.

  27. Is it fine to put part of this on my webpage if perhaps I submit a reference to this website?

  28. I love your wordpress design, where did you get a hold of it?

  29. Im getting a javascript error, is anyone else?

  30. After I start your Rss feed it appears to be a lot of nonsense, is the problem on my side?

  31. The structure for your web site is a little bit off in Epiphany. Even So I like your web site. I might have to use a normal web browser just to enjoy it.

  32. Heya, I just hopped over to your web site thru StumbleUpon. Not somthing I might generally browse, but I enjoyed your views none the less. Thanks for creating some thing worthy of reading.

  33. The will in the persons is the only legit footing connected with almost any federal government, and defend their free phrase need to be the primary subject.

  34. just beneath, are various entirely not connected sites to ours, nevertheless, they are surely really worth going over

  35. The tax-supported, required academic program is the full style of your totalitarian talk about

  36. You have very nice blog here. Only one thing what I noticed, it was very hard to find it from google (at least with my search term). You should try this: http://bit.ly/11UpQn2 It will get you better ranking in google. I use it all my wp blogs.If you have any problems to use it, just send me email and I try to help. If you dont have wp, check this out: http://bit.ly/13T2ILb

  37. The involving freedom can be a background regarding opposition. The of freedom can be a history regarding limitations of governmental strength, certainly not the enhance from it.

  38. Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  39. One of our visitors not long ago recommended the following website.

  40. we came across a cool web-site that you may well get pleasure from. Take a look in the event you want

Comments are closed.

%d bloggers like this: