Lately, I’ve felt a bit alone in The World of what’s new, cool and wonderful. If you’ve been following the Web 2.0 blogs lately, you know what I’m talking about. I feel like everybody is talking a language I don’t understand and as the minutes pass the gab widens. Yet, somehow I don’t feel I’m missing out on anything important. It’s an ambiguous feeling about a choice between learning the language or not.

If I jump on the bandwagon and try to learn the language, I will no more feel distanced from The World. It would be like a new chapter in the blogosphere will open up to me and let me in on the ever so wonderful discussions about the newest coolest things.

If I choose not to seek the wonders of The World, then what? Will it impact my professional life in any way or is it more social by nature? If it is a social experiment, what would the benefits be for the outsider that isn’t active looking for a new World? Of my relative insignificant understanding of addiction, this would qualify.

Ruby, SOA and AJAX are just some of the acceptable subjects in The World of relative few acceptable subjects. And that is despite of the already long lifetime of each of them, but somehow that doesn’t matter to the residents of The World. They seem to be two steps behind and proud of it.

Even though most developers have used the same tools - as The World now dictates - for several years, it still seem that we don’t use them enough to be fully accepted. In that perspective we are left with a difficult choice. Should we continue to use the tools or should we continue to use the tools and tell The World that we do in order to get accepted?

The easiest way to make a redirection in ASP.NET is using Response.Redirect(url). What it actually does is, that it creates a response with the “302 (Object Moved)” status code and the target destination. It tells the browser that the requested page is temporarily moved to a new location and then the browser makes a request to the new destination.

If the page is permanently moved, then the 302 status code is no longer correct. Search engines also looks at 301 and 302 redirects differently. Here’s a quote from The Internet Digest:

From a search engine perspective, 301 redirects are the only acceptable way to redirect URLs. In the case of moved pages, search engines will index only the new URL, but will transfer link popularity from the old URL to the new one so that search engine rankings are not affected.

There is no natural way of doing a 301 redirect in ASP.NET, so you have to set the HTTP headers manually. I’ve written a small method that illustrates how to do it. All you have to do is to call it from the Page_Load or preferably from Page_Init or in ASP.NET 2.0 Page_PreInit.

protected void Page_PreInit(object sender, EventArgs e)

{

  PermanentRedirect("http://www.newsite.com");

  PermanentRedirect("/newfolder/");

}

 

private void PermanentRedirect(string url)

{

  Response.Clear();

  Response.StatusCode = 301;

  Response.AppendHeader("location", url);

  Response.End();

}