[TYPO3-timtab] RealURL drives me crazy

Elijah Alcantara elijah.alcantara at gmail.com
Tue Sep 11 15:43:00 CEST 2007


Hi,

I currently run timtab with multiple subdomains, how about giving my
configs a try? this one works for me:

.htaccess:

RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* /index.php


realurl config: (take note of the
"$TYPO3_CONF_VARS['EXTCONF']['realurl']['<yourdomain.com>']" below,
change it for your domains and id's)

<?
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
            'respectSimulateStaticURLs' => 0,
#            'postVarSet_failureMode'=>'redirect_goodUpperDir',
        ),
    'redirects' => array (),
    'preVars' => array(
                        array(
                                'GETvar' => 'no_cache',
                                'valueMap' => array(
                                    'no_cache' => 1,
                                ),
                                'noMatch' => 'bypass',
                        ),
                         array(
                             'GETvar' => 'L',
                             'valueMap' => array(
                                                'en' => '1',
                                        ),
                                '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' => 73,
        ),

      '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]',
                        ),
                    ),
                    'indexed-search'	=> array(
				array(
					'GETvar'	=> 'tx_indexedsearch[sword]'
				)
				, array(
					'GETvar'	=> 'tx_indexedsearch[ext]'
				)
				, array(
					'GETvar'	=> 'tx_indexedsearch[submit_button]'
				)
				, array(
					'GETvar'	=> 'tx_indexedsearch[_sections]'
				)
				, array(
					'GETvar'	=> 'tx_indexedsearch[pointer]'
				)
			),
                // 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'=>1,
            'index' => array(

                'print.html' => array(
                    'keyValues' => array (
                        'type' => 98,
                    ),
                ),
                '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['FE']['pageNotFound_handling_statheader'] = "HTTP/1.1
404 Not Found";

#Use this if you error 404 page is a static html-file
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] =
'READFILE:fileadmin/templates/pageNotFound.html';

#Use this if you are using a TYPO3 page as your error 404 page AND you
are using realurl
#You should have a page with title or alias '404' in order for this to work
#$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '404/';

$TYPO3_CONF_VARS['EXTCONF']['realurl']['elijah.pinoguin.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['elijah.pinoguin.com']['pagePath']['rootpage_id']
= 9;

$TYPO3_CONF_VARS['EXTCONF']['realurl']['forums.pinoguin.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['forums.pinoguin.com']['pagePath']['rootpage_id']
= 98;

?>


If that works, your urls for news/blog should look like this:
http://elijah.pinoguin.com/blog/blog-view/article/subversion-quick-howto.html


HTH,
-- 
Elijah O. Alcantara
http://elijah.pinoguin.com
Web/Typo3, Linux & Unix Freelancer


More information about the TYPO3-project-timtab mailing list