Je te remercie
voiçi mon htaccess:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301]
RewriteRule (catalog/)(.*)$ /$2 [L,R=301]
RedirectPermanent /catalogeph.php http://www.example.com/eco-boutique.php
RedirectPermanent /concept.php http://www.example.com/eco-boutique.php
RedirectPermanent /presentation.php http://www.example.com/eco-boutique.php
RewriteBase /
RewriteRule ^fr/(.*)(.*)$ $1?language=fr&%{QUERY_STRING}
RewriteRule ^en/(.*)(.*)$ $1?language=en&%{QUERY_STRING}
RewriteCond %{QUERY_STRING} ^options\=(.*)$
auquel j'ai ajouter dans le header de mes pages en PHP:
Code:
$urldemande= 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
[..]
$urltheorique = ...
[..]
if (($urldemande!=$urltheorique)&&($contientfacebook=='')&&($urltheorique != ''))
{
header('HTTP/1.1 301 Moved Permanently', false, 301);
header("Location: $urltheorique");
echo '<link rel="canonical" href="'.$urltheorique.'" />';
}?>
Si quelqu'un peut jeter un coup d'oeil