Hello!
sometime we need to 301 Redirect
First we have to know what is [301 Redirect]
 
301 Redirect is permanent
302 Redirect is temporary
so here is the point
if you use 301 Redirect
your boswer will cache the Redirect
event you edit code to not Redirect
you will found browser still Redirect
so need to careful to use 301 Redirect
 
use http header is
301Redirect: HTTP/1.1 301 Moved Permanently
302Redirect: HTTP/1.1 301 Temporarily Moved
 
in PHP
 
$goLink = "http://test.com";//new url
header("HTTP/1.1 301 Moved Permanently");
header("Location: $goLink");
in Joomla3
 
$goLink = "http://test.com";//new url
JResponse::setHeader("HTTP/1.1 301 Moved Permanently");
JResponse::setHeader("Location",$goLink );
 
 
chrees!