Permanent Redirect vs Temporary Redirects in PHP

February 8, 2014 at 9:15 am

This is how you do a standard redirect:

[codesyntax lang=”php”]
<?php
header(“Location: http://ardi.co.za”);
?>
[/codesyntax]

And this is how you do a redirect that is permanent:

[codesyntax lang=”php”]<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: http://ardi.co.za”);  
?>[/codesyntax]

Tags: