PERMANENT REDIRECT HTTP 301
Permanent Redirection help us to maintain permanent connections to the old page, he tells to the search engine that the page has been permanently moved and if the new adress has a new url avoid penalizing SEO for duplicat content.
We present below redirect codes for various types of pages:
HTTP 301 Redirect in HTML ( HEADER REFRESH ):
<meta http-equiv="refresh" content="0;url=http://page.html">
HTTP 301 Redirect in PHP :
<?php // Permanent redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.himmera.com/page.html");
exit(); ?>
HTTP 301 Redirect in ASP-VBScript:
<%@ Language=VBScript %>
<%
' Permanent redirection Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.himmera.com/"
Response.End
%>
HTTP 301 Redirect in ColdFusion :
<CFHEADER statuscode="301" statustext="Moved Permanently">
<CFHEADER name="Location" value="http://www.himmera.com/">
HTTP 301 Redirection In Perl
#!/usr/bin/perl -w
use strict;
print "Status: 301 Moved Permanantly\n";
print "Location: http://www.himmera.com/page.htm\n\n";
exit;
HTTP 301 Redirection with mod_rewrite
rewriteEngine on
rewriteRule ^category\.php$ http://www.himmera.com/page.php [R=permanent,L]
HTTP 301 Redirection with Javascript
<html>
<head>
<script type="text/javascript"> window.location.href='http://www.himmera.com/'; </script>
</head>
<body> This page has moved to <a href="http://www.himmera.com/">http://www.himmera.com/</a>
</body>
</html>