Hallo und schönen guten Morgen!
Ich benutze Typo3 4.3.3 mit Real URL 1.8.1 und versuche noch schon seit
einiger
Zeit mehrere Domänen (also verschiedene Seitenbäume) einzurichten.
Gelesen habe ich bereits einiges über Domain Records, Real URL Config
usw., aber
irgendwie scheine ich nicht zu 100% damit klarzukommen.
Vorab gleich einmal mein Seitenbaum:
hauptdomain.com
sub1.hauptdomain.com
Root
Home
...
...
sub2.hauptdomain.com
Root
Home
...
...
Und hier meine Real URL Konfiguration:
<?php
/**
*
* aeUrlTool default realurl configuration
* based on realurl-configuration of news.typo3.org
* http://news.typo3.org/about/realurl-configuration/
*
*/
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
'_DEFAULT' => array (
'init' => array (
'enableCHashCache' => '1',
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => '1',
'enableUrlEncodeCache' => '1',
),
'redirects' => array (
),
'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
),
'noMatch' => 'bypass',
),
'2' => array (
'GETvar' => 'lang',
'valueMap' => array (
'de' => 'de',
'en' => 'en',
),
'noMatch' => 'bypass',
),
),
'pagePath' => array (
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '7',
'rootpage_id' => '2',
),
'fixedPostVars' => array (
),
'postVarSets' => array (
'_DEFAULT' => array (
'datum' => array (
'0' => array (
'GETvar' => 'tx_ttnews[year]',
),
'1' => array (
'GETvar' => 'tx_ttnews[month]',
'valueMap' => array (
'jaenner' => '01',
'februar' => '02',
'maerz' => '03',
'april' => '04',
'mai' => '05',
'juni' => '06',
'juli' => '07',
'august' => '08',
'september' => '09',
'oktober' => '10',
'november' => '11',
'dezember' => '12',
),
),
),
'browse' => array (
'0' => array (
'GETvar' => 'tx_ttnews[pointer]',
),
),
'kategorie' => array (
'0' => array (
'GETvar' => 'tx_ttnews[cat]',
),
),
'artikel' => array (
'0' => array (
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array (
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
'1' => array (
'GETvar' => 'tx_ttnews[swords]',
),
),
),
),
'fileName' => array (
//
// if you don't want .html-URLs set the following to "false" (e.g.
'defaultToHTMLsuffixOnPrev' => false,)
// then you get http://www.yourdomain.com/imprint/ instead of
http://www.yourdomain.com/imprint.html
//
'defaultToHTMLsuffixOnPrev' => false,
'index' => array (
'rss.xml' => array (
'keyValues' => array (
'type' => '100',
),
),
'rss091.xml' => array (
'keyValues' => array (
'type' => '101',
),
),
'rdf.xml' => array (
'keyValues' => array (
'type' => '102',
),
),
'atom.xml' => array (
'keyValues' => array (
'type' => '103',
),
),
),
),
),
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.hauptdomain.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['sub2.hauptdomain.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['sub2.hauptdomain.com']['pagePath']['rootpage_id']
= 1;
?>
Typo3 ist im Verzeichnis content auf meinem Webspace eingerichtet, d.h.
auch die
Hauptdomain ist über www.hauptdomain.com/content erreichbar.
Das Root Template von sub1.hauptdomain.com sieht also folgendermassen aus:
config {
# --- realurl konfigurieren
simulateStaticDocuments = 0
baseURL = http://www.hautpdomain.com/content/
tx_realurl_enable = 1
}
Das Root Template von sub2.hauptdomain.com sieht so aus:
config {
# --- realurl konfigurieren
simulateStaticDocuments = 0
baseURL = http://sub2.hautpdomain.com/content/
tx_realurl_enable = 1
}
Dann habe ich noch einen Domain Record auf der Root Seite von
sub2.hauptdomain.com
angelegt, wobei ich aber nicht weiß, ob das überhaupt stimmt?
sub2.hauptdomain.com
Dauerhaft verschoben
sub2.hauptdomain.com/content/
Mich würden vor allem die Grundlagen dahinter interessieren und wie die
einzelnen
Komponenten zusammenspielen?
Meine .htaccess sieht so aus:
# Enable URL rewriting
RewriteEngine On
RewriteBase /content
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php
RewriteRule ^(.*)\.htm$ /index.php
Was läuft jetzt genau wie ab, wenn man z.B.: www.hauptdomain.com/content
in den Browser eingibt?
Ich würde gerne nicht einfach eine fertige Config verwenden, sondern
auch verstehen
was da im Hintergrund abläuft...
Was macht die .htaccess Datei?
Wann und wo greift das Real URL ein?
Was macht dann der Domain Record?
Wo richte ich das ein, dass ich das /content in Zukunft weglassen kann
und der
User einfach nur www.hauptdomain.com einzugeben braucht
Und vor allem:
WIE muss meine Konfiguration für das oben dargestellte Szenario aussehen?
Vielen Dank für eure Hilfe!
snorre