About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Wednesday, June 21, 2006

How to redirect a page, the right way.

Good information to keep in mind for updating websites, using the 301.
http://www.stevenhargrove.com/redirect-web-pages/


Since, I'm developing mostly in ASP.Net, here is his sample code on how to use it.


<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com/");
}
</script>

No comments: