[TYPO3-english] RealURL - shortcut to home

Dennis Hoffland d.o.hoffland at tele2.nl
Wed Sep 13 12:02:35 CEST 2017


Hello,

I am trying to configure RealURL to deliver a speaking URL home.html for my home page (in the menu).

My page structure is:
-home
---home (shortcut to home on root level above)
---page1
---page2

= Option 2 as suggested here: https://github.com/dmitryd/typo3-realurl/wiki/Notes-for-Integrators#home-page-root-page-and-shortcuts

I've tried the following code in realurlconf.php:

<?php 
// [TYPO3_SITE_URL] [preVars] [pagePath] [fixedPostVars] [postVarSets] [fileName]

// [preVars]		: language
// [pagePath]		: page ID
// [fixedPostVars]	:
// [postVarSets]	: extension plugin(s)

/*
 *
 * RealURL setup for www.mydomain.com *
 *
*/

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
	'_DEFAULT' => array(
//	'www.mydomain.com' => array(
		'init' => array(
			'enableCHashCache' => true,
			'enableUrlDecodeCache' => true,
			'enableUrlEncodeCache' => true,
			'appendMissingSlash' => 'ifNotFile',
//			'postVarSet_failureMode' => 'ignore',
			'emptyUrlReturnValue' => true,
		),
		'redirects' => array(),
		'preVars' => array(
		array(
			'GETvar' => 'L',
				'valueMap' => array(
				'nl' => '1',
				'en' => '2',
			),
			'valueDefault' => 'nl',
		     ),
		),
		'pagePath' => array(
			'type' => 'user',
			'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
//			'spaceCharacter' => '_',
			'languageGetVar' => 'L',
//			'expireDays' => 7,
			###### Set your root page ID here ######
			'rootpage_id' => 1,
//			'excludePageIds' => 1,
			'dontResolveShortcuts' => true,
		),
		'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]',
						),
					),
				),
			),
    	'fileName' => array (
      	  	'defaultToHTMLsuffixOnPrev' => true,
          	'acceptHTMLsuffix' => false,
			'index' => array(
                 'print.html' => array(
                      'keyValues' => array(
                            'type' => 98,
                            ),
                       ),
            // add robots.txt page type
                 'robots.txt' => array(
                      'keyValues' => array(
                            'type' => 201
                      )
                 )
             ),
			
			
    		),

	),
);
 php?>

Instead of www.mydomain.com/home.html I get www.mydomain.com/1 as a link to my Home page in the menu. If I follow that link to the Home page and go back to the menu all speaking URL's are dropped!

My TS-setup contains the following code:

 # *****
# RealURL
# *****

Setupconfig.simulateStaticDocuments = 0

config.prefixLocalAnchors = all
config.tx_realurl_enable = 1
config.uniqueLinkVars = 1
# config.defaultToHTMLsuffixOnPrev = 1

config.linkVars = L(0-2)

[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = nl
config.locale_all = nl_NL.utf8

[globalVar = GP:L = 2]
config.sys_language_uid = 2
config.language = en
config.locale_all = en_UK.utf8

[GLOBAL]

Note: I am using Dutch (=nl) as only language in the FE.

My .htaccess file contains no extra code (simply oploaded the file from CMS 7.6.22).


Despite my very basic website setup and going through the realURL manual, I can't figure out how to solve this.

Who can offer help?

Kind regards,

Dennis




More information about the TYPO3-english mailing list