August 9, 2005
@ 11:14 PM

Tight

ASP.net

<%@Page Language="C#"%>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e) {
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","
http://blog.justinho.com");
}
</script>

This code will intelligently redirect a browser that loads it - generating a 301 status code instead of just a
Untight <meta http-equiv="REFRESH" content="10;url=http://justinho.com">
Which, frankly, does nothing and breaks search engine linking, and relies on client-based redirecting.

ColdFusion
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="
http://blog.justinho.com">

PHP
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:
http://blog.justinho.com" );
?>

htaccess
Create a .htaccess file (if does not exists) in your root directory.
Redirect permanent / http://blog.justinho.com

ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently" Response.AddHeader "Location", "
http://blog.justinho.com"
%>

See also
http://www.php.net/manual/en/function.header.php