habe das Modul "Navigation_Breadcrumb" umgebaut, da es mit AMR immer index.html liefert.
/ und /index.html sind nicht gern gesehen von SEO's, Duplicate Content durch index.html.
Bestätigen kann ich das nicht.
Code: Alles auswählen
<?php
// include Contenido_FrontendNavigation_Breadcrumb class
cInclude('classes', 'Contenido_FrontendNavigation/Contenido_FrontendNavigation_Breadcrumb.class.php');
try {
$oBreadcrumb = new Contenido_FrontendNavigation_Breadcrumb($db, $cfg, $client, $lang, $cfgClient);
$oBreadCategories = $oBreadcrumb->get($idcat, 1); // starting level in this case is 1, not 0
if ($oBreadCategories->count() > 0) {
foreach ($oBreadCategories as $oBreadCategory) {
// please remember, this is a sample - or a live application it's better to use a template!
if ($cfg['url_builder']['name'] == 'front_content' || $cfg['url_builder']['name'] == 'MR') {
$aParams = array('lang' => $lang, 'idcat' => $oBreadCategory->getIdCat());
} else {
$aParams = array('a' => $oBreadCategory->getIdCat(),
'idcat' => $oBreadCategory->getIdCat(), // needed to build category path
'lang' => $lang, // needed to build category path
'level' => 0); // needed to build category path
}
try {
$seolink=str_replace('&','&',Contenido_Url::getInstance()->build($aParams));
} catch (InvalidArgumentException $e) {
$seolink='front_content.php?idcat='.str_replace('&','&',$oBreadCategory->getIdCat());
}
$seolink=str_replace('index.html','',$seolink);
//Achtung: verwende hier kein Template!
echo '<a class="breadcrumb" href="'.$seolink.'" title="'.$oBreadCategory->getCategoryLanguage()->getName().'"> :: '.
$oBreadCategory->getCategoryLanguage()->getName().
'</a> ';
}
}
} catch(Exception $e) {
echo 'Shit happens: ' . $e->getMessage() . ': ' . $e->getFile() . ' at line '.$e->getLine() . ' ('.$e->getTraceAsString().')';
}
?>
Zusätzlich würde ich noch in der .htaccess folgende zeilen einfügen:
Code: Alles auswählen
RewriteCond %{HTTP_HOST} !^www\.domain\.de$ [NC]
RewriteRule ^(.*)$ http://www.domain.de/$1 [R=301,L]
RewriteCond %{THE_REQUEST} index\.html [NC]
RewriteRule ^(.*)index\.html /$1 [NC,L,R=301]
Der rest entfernt index.html, wenn es eingeben wurde.
ich hoffe das hilft ...