[TYPO3] Exclude pid in RealURL Config?

Amir M. amir219 at sbcglobal.net
Thu Aug 3 19:17:28 CEST 2006


Hi,

I have a Typo3 website, using RealURL, as well as 3 seperate domain 
names in one installation and one template.  I am having a little 
problem regarding the urls.

For example, for one of my sites, http://civ.stratcommandcenter.com , 
when you click a page inside that site, the url comes out like this:
http://civ.stratcommandcenter.com/civilization-iv/general/overview/

It comes with "civilization-iv" segment in the link.  However I DO NOT 
want that segment in the urls.  It is the root page of the subsite, but 
I dont want it to appear on the url.  I want it to be like this instead:
"http://civ.stratcommandcenter.com/general/overview/"

Is this possible somehow?  Maybe there is an excludePid field for 
Realurl?  Here is my realURL configuration incase its needed:


----
REAL URL CONFIGURATION:
<?php

// template settings
/*

*/


// edit rootpage_id near script bottom
// The root page id is the uid of your domain home in the Typo3 page tree

// clean out urls
/*
TRUNCATE `tx_realurl_chashcache`;
TRUNCATE `tx_realurl_pathcache`;
TRUNCATE `tx_realurl_uniqalias`;
TRUNCATE `tx_realurl_urldecodecache`;
TRUNCATE `tx_realurl_urlencodecache`;
UPDATE `pages` SET `tx_realurl_pathsegment` = '';
*/

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][] 
= 'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][] 
= 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urldecodecache'] 
= 'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urlencodecache'] 
= 'tx_realurl_urlencodecache';
// MLC clear cache on this detroys old urls as well
// 
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_pathcache'] 
= 'tx_realurl_pathcache';

$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= 
',tx_realurl_pathsegment,alias,nav_title,title';

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array();
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
	'init' => array(								
		'enableCHashCache' => 1
		// disable enableUrlDecodeCache for multiple domains as no root pid is
		// caught and the system check to see if correct page path is grabbed
		, 'enableUrlDecodeCache' => 1
		, 'enableUrlEncodeCache' => 1
		, 'appendMissingSlash' => 'ifNotFile'
		, 'respectSimulateStaticURLs' => 0
		, 'postVarSet_failureMode' => 'redirect_goodUpperDir'
	),											
		'redirects' => array(),
		'preVars' => array(
			array(
				'GETvar' => 'no_cache',
				'valueMap' => array(
					'nc' => 1,
				),
				'noMatch' => 'bypass',
			),
			array(
				'GETvar' => 'L',
				'valueMap' => array(
					'dk' => '2',
					'de' => '1',
				),
				'noMatch' => 'bypass',
			),
		),
		'pagePath' => array(
			'type' => 'user',
			'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
			'spaceCharacter' => '-',
'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
			'languageGetVar' => 'L',
			'expireDays' => 7,
###### include your rootpage id here
			'rootpage_id' => 81,
		),
		'fixedPostVars' => array(),
		'postVarSets' => array(
			'_DEFAULT' => array(
				// news archive parameters
				'archive' => array(
					array(
						'GETvar' => 'tx_ttnews[year]' ,
						),
					array(
						'GETvar' => 'tx_ttnews[month]' ,
						'valueMap' => array(
							'january' => '01',
							'february' => '02',
							'march' => '03',
							'april' => '04',
							'may' => '05',
							'june' => '06',
							'july' => '07',
							'august' => '08',
							'september' => '09',
							'october' => '10',
							'november' => '11',
							'december' => '12',
							)
						),
					),
				// news pagebrowser
				'browse' => array(
					array(
						'GETvar' => 'tx_ttnews[pointer]',
						),
					),
				// news categories
				'select_category' => array (
					array(
						'GETvar' => 'tx_ttnews[cat]',
						),
					),
				// news articles and searchwords
				'article' => array(
					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' => '-',
								),
							),
						),
					array(
						'GETvar' => 'tx_ttnews[swords]',
						),
					),
				),
			),
		// configure filenames for different pagetypes
		'fileName' => array(
			'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,
					),
				),
			),
		),
);

// multiple domain setup example
// cannonbose.com is our default anyways, but specify for best results
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.stratcommandcenter.com/redesign4/'] 
= $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.stratcommandcenter.com/redesign4/']['pagePath']['rootpage_id'] 
= 32;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['stratcommandcenter.com/redesign4/'] 
= 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.stratcommandcenter.com/redesign4/'];

// $TYPO3_CONF_VARS['EXTCONF']['realurl']['civ.stratcommandcenter.com'] 
= $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
// 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['civ.stratcommandcenter.com']['pagePath']['rootpage_id'] 
= 77;

// $TYPO3_CONF_VARS['EXTCONF']['realurl']['tw.stratcommandcenter.com'] = 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
// 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['tw.stratcommandcenter.com']['pagePath']['rootpage_id'] 
= 236;

?>



More information about the TYPO3-english mailing list