Blog

301 Redirect on page code

by

301 Redirect

301 redirection and the Search Engines. It’s really not that hard to implement and it should help your search engine rankings when move sites or pages that where listed in the search engine

The Search Engines see the “301″ Has “moved permanently”.


301 Redirect in ColdFusion
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-site.com">


301 Redirect in PHP
<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-site.com" );
?>


301 Redirect in ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", " http://www.new-site.com"
>


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

hope thats helps

DaveN

9 Comments

Write your comment

Optional

The Bronco Family
Work With Us