leider schreibst Du nicht, ob Du SimulateStatic oder realurl nutzt, daher hier eine Konfiguration für realurl:
Hier angenommen: Du erreicht Deine Typo3-Seite über http://www.example.com/meinweb/
Das hier als .htaccess im Ordner srv/www/webverzeichnis/meinweb/ ablegen:
# Enable URL rewriting
RewriteEngine On
# we are in a subdirectory
RewriteBase /meinweb/
# Stop rewrite processing if we are in the typo3/ directory
RewriteRule ^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic.php)/ - [L]
# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
RewriteRule ^typo3$ typo3/index_re.php [L]
# If the file/symlink/directory does not exist => Redirect to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
RewriteRule .* index.php [L]
Jetzt per TypoScript realurl aktivieren:
config.baseURL = http://www.example.com/meinweb/
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
config.prefixLocalAnchors = all
# config.absRefPrefix = http://example.com/... #VERBOTEN, sonst geht realurl nicht!
Und realurl noch in der localconf.php konfigurieren:
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'_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(
'nc' => 1,
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'L',
'valueMap' => array(
'de' => '0',
),
'noMatch' => 'bypass',
),
),
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 2,
'rootpage_id' => 1,
),
'fixedPostVars' => array(),
'postVarSets' => array(
'_DEFAULT' => array(
// goof_photobook parameters
'album' => array(
array(
'GETvar' => 'tx_gooffotoboek_pi1[srcdir]'
),
array(
'GETvar' => 'tx_gooffotoboek_pi1[func]',
'valueMap' => array(
'thumbnails' => 'thumb',
'single' => '',
),
),
array(
'GETvar' => 'tx_gooffotoboek_pi1[fid]'
),
),
// CAL parameters
'cal'=> array(
array(
'GETvar' => 'tx_cal_controller[view]'
),
array(
'GETvar' => 'tx_cal_controller[getdate]'
),
array(
'GETvar' => 'tx_cal_controller[gettime]'
),
array(
'GETvar' => 'tx_cal_controller[lastview]'
),
array(
'GETvar' => 'tx_cal_controller[type]'
),
array(
'GETvar' => 'tx_cal_controller[category]',
'lookUpTable' => array(
'table' => 'tx_cal_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_cal_controller[uid]',
'lookUpTable' => array(
'table' => 'tx_cal_event',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_cal_controller[gettime]'
),
array(
'GETvar' => 'tx_cal_controller[preview]'
),
),
// NEWS archive parameters
'archive' => array(
array(
'GETvar' => 'tx_ttnews[year]' ,
),
array(
'GETvar' => 'tx_ttnews[month]' ,
'valueMap' => array(
'januar' => '01',
'februar' => '02',
'maerz' => '03',
'april' => '04',
'may' => '05',
'juni' => '06',
'juli' => '07',
'august' => '08',
'september' => '09',
'oktober' => '10',
'november' => '11',
'dezember' => '12',
)
),
),
// NEWS pagebrowser
'browse' => array(
array(
'GETvar' => 'tx_ttnews[pointer]',
),
),
// NEWS categories
'select_category' => array (
array(
'GETvar' => 'tx_ttnews[cat]',
),
),
// ve_guestbook
'seite' => array (
array(
'GETvar' => 'tx_veguestbook_pi1[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[backPid]',
),
array(
'GETvar' => 'tx_ttnews[swords]',
),
),
),
),
// configure filenames for different pagetypes
'fileName' => array(
'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,
),
),
'cal.ics' => array(
'keyValues' => array(
'type' => 150,
),
),
),
),
),
);