[TYPO3-german] Duplicate Content
Renzo Bauen
typo3 at conpassione.ch
Fri Aug 29 00:39:21 CEST 2014
Hallo Louis
ich mach das in der .htaccess etwa so:
=======================================================================================
RewriteEngine On
# SEO: Ohne www zu www umleiten
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,QSA,CL,L]
# SEO: Grossbuchstaben in Kleinbuchstaben umwandeln (geht nur auf
Windows Server, für Apache habe ich da noch keine gute Lösung...)
RewriteCond %{REQUEST_URI} [A-Z]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) $1 [R=301,CL,QSA,L]
# GZIP-Komprimierung
<FilesMatch "\.js\.gzip$">
AddType "text/javascript" .gzip
AddEncoding gzip .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
AddType "text/css" .gzip
AddEncoding gzip .gzip
</FilesMatch>
# Change this path, if your TYPO3 installation is located in a
subdirectory of the website root.
#RewriteBase /
# Rules to set ApplicationContext based on hostname: das ist neu für 6.2
#RewriteCond %{HTTP_HOST} ^dev\.example\.com$
#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
#RewriteCond %{HTTP_HOST} ^staging\.example\.com$
#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
#RewriteCond %{HTTP_HOST} ^www\.example\.com$
#RewriteRule .? - [E=TYPO3_CONTEXT:Production]
# allgemeines Rewriting
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
# Basic security checks
# - Restrict access to deleted files in Recycler directories
# - Restrict access to TypoScript files in default templates directories
# - Restrict access to Private extension directories
RewriteRule ^fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^fileadmin/design/.*(\.txt|\.ts)$ - [F]
RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]
# Stop rewrite processing, if we are in the typo3/ directory.
RewriteRule ^(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon
\.ico) - [L]
# If the file/symlink/directory does not exist => Redirect to index.php.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
RewriteRule .* index.php [L]
=======================================================================================
und in der Real-URL Konfiguration so:
=======================================================================================
<?php
$tx_realurl_config_init = array (
// real url configuration for key init
'doNotRawUrlEncodeParameterNames' => FALSE,
// 'enableAllUnicodeLetters' => false,
'enableCHashCache' => TRUE,
'respectSimulateStaticURLs' => 0,
'appendMissingSlash' => 'ifNotFile,redirect',
'adminJumpToBackend' => TRUE,
'postVarSet_FailureMode' => 'ignore',
//'disableErrorLog' => false,
'enableUrlDecodeCache' => TRUE,
'enableUrlEncodeCache' => TRUE,
'emptyUrlReturnValue' => '',
//'reapplyAbsRefPrefix' => TRUE,
'emptySegemntValue' => '',
);
$tx_realurl_config_redirects = array (
// real url configuration for key redirects
// example: 'test/' =>'301;http://www.xy.ch',
//'team/' => 'team/list/alle/',
);
$tx_realurl_config_redirects_regex = array (
// real url configuraton for key redirects_regex
);
$tx_realurl_config_preVars = array (
// real url configuration for key preVars
array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
'fr' => '2',
'it' => '3',
),
// for real multilanguage situations, where the language ever has to be
added
// add valueDefault and remove noMatch
//'valueDefault' => 'de',
'noMatch' => 'bypass',
),
array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => 1,
),
'noMatch' => 'bypass',
),
);
$tx_realurl_config_pagePath = array (
// real url configuration for key pagePath
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 30,
'rootpage_id' => 1,
'segTitleFieldList' => 'alias,tx_realurl_pathsegment,title',
);
$tx_realurl_config_fixedPostVars = array (
);
$tx_realurl_config_postVarSets = array (
// real url configuration for key postVarSets
'_DEFAULT' => array (
),
);
$tx_realurl_config_fileName = array (
// real url configuration for key fileName
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 0,
'index' => array (
'sitemap.xml' => array (
'keyValues' => array (
'type' => 97,
),
),
'print' => array (
'keyValues' => array (
'type' => 98,
),
),
),
);
$tx_realurl_config_default = array (
'init' => $tx_realurl_config_init,
'redirects' => $tx_realurl_config_redirects,
'redirects_regex' => $tx_realurl_config_redirects_regex,
'preVars' => $tx_realurl_config_preVars,
'pagePath' => $tx_realurl_config_pagePath,
'fixedPostVars' => $tx_realurl_config_fixedPostVars,
'postVarSets' => $tx_realurl_config_postVarSets,
'fileName' => $tx_realurl_config_fileName,
);
# für jede Domain muss hier der richtige Eintrag gemacht werden
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array (
'www.mydomain.tld' => $tx_realurl_config_default,
);
unset($tx_realurl_config);
unset($tx_realurl_config_init);
unset($tx_realurl_config_redirects);
unset($tx_realurl_config_redirects_regex);
unset($tx_realurl_config_preVars);
unset($tx_realurl_config_pagePath);
unset($tx_realurl_config_fixedPostVars);
unset($tx_realurl_config_postVarSets);
unset($tx_realurl_config_fileName);
?>
=======================================================================================
Und dann kommen natürlich noch die entsprechenden Konfigurationen im
TS-Setup dazu
=======================================================================================
# Grundeinstellungen des Systems
config {
doctype = html5
noPageTitle = 1
disablePrefixComment = 1
}
# SEO freundliche URL's erzeugen
config {
baseURL = http://www.mydomain.tld/
tx_realurl_enable = 1
pageTitleFirst = 1
jumpUrl = 1
jumpUrl.secure = 1
}
=======================================================================================
Im Weiteren musst Du Dir die Metadaten und die Canonical-Tags ausgeben
lassen in deinem TS-Setup. Im Installtool die Compression von FE und BE
auf >=5 setzen, Favicons und Sitemap.xml hinzufügen, Javascript und CSS
Dateien zusammen fassen und komprimieren lassen, etc. etc.
Eine richtige SEO Optimierung ist ein hartes Stück Arbeit und hört vor
allem nie auf.
Beste Grüsse
Renzo
--
conPassione gmbh
CH-3661 Uetendorf
+41 33 345 00 92
More information about the TYPO3-german
mailing list