[TYPO3] RealURL generating strange links with page UID instead of segments
Dmitry Dulepov
dmitry at typo3.org
Tue Oct 3 13:39:47 CEST 2006
Hi!
Ricardo Pereira wrote:
> I have 2 sites in my page tree. So now I have RealURL configured with
> "_DEFAULT", "www.tdwg.gbif.org", and "tdwg2006.tdwg.org". The "_DEFAULT"
> array was missing. This seems to have fixed my problem.
Than it may be different. *If* these two domains represent two different
sites (= they have separate home page in the tree), you need separate
entries for them in realurl config. The reason for this is that you need
to supply rootpage_id for each of them. You can use _DEFAULT for both,
of course, and do not set rootpage_id at all. Realurl will be able to
figure out correct root page id by domain name but at cost of
performance. It will have to perform several more costly queries in the
database each time (!) when someone accesses your pages.
I usually do this way: I set up a temporary variable with realurl
configuration. It has everything except rootpage_id. Then I change
rootpage_id for each site separately. Looks like:
$realurl_template = array(
'init' => array(
...
),
...
);
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'www.site1.com' => 'site1.com',
'site1.com' => $realurl_template,
'www.site2.com' => 'site2.com',
'site2.com' => $realurl_template,
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['site1.com']
['pagePath']['rootpage_id'] = 1;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['site2.com']
['pagePath']['rootpage_id'] = 1000;
unset($realurl_template);
> Dmitry, you are a GENIUS!!! Thanks a million again!!!
It is just experience :)
--
Dmitry Dulepov
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
More information about the TYPO3-english
mailing list