esdeen

301 Redirection

301 redirections can be configured through htaccess files or directly within the code. They are chiefly used to redirect users and search engines from old non-existing URLs to their corresponding new ones.

After relaunchin your website and changing its link structure, old product links could redirect to their new corresponding URLs via 301 redirects.

Using 301 redirects, an old link's link trust can be handed over to the new URL.

301 Redirect in PHP

<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.domain.com/new-url" );
?>

301 Redirect via .htaccess

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*) http://domain.com/$1 [L,R=301]
solicom agencia web
C/ Progreso 2, Oficina 155
Pol. Industrial Los Olivos
28906 Getafe // Madrid, Spain
T: +34 91 133 0581
E: info@solicom.net