Pour informer les moteurs de recherche d'une redirection permanente, 3 méthodes sont possibles :
- le fichier HTACCESS (".htaccess") :
RedirectPermanent /ancien/page.html http://www.domaine.com/nouvelle-page.htm
- HTML :
Balise meta REFESH ("meta equiv="'refresh'" content="'0;" url="nouvelle-page.html'">")
- PHP :
header('Location: http://nom-domaine.fr/nouvelle-page.php');
//Code de redirection permanente (doublon utile pour certaines configurations)
header('HTTP/1.1 301 Moved Permanently');
header('Status: 301 Moved Permanently');
header('Content-Type: text/html; charset=UTF-8');
Aucun commentaire:
Publier un commentaire