[TYPO3] multi language config RealURL issue - Please help?!

Finees Mendez fineesmendez at yahoo.com
Sat Nov 17 00:49:54 CET 2007


Hi, I have the following RealURL configurations. For some reason the alternate language is accessible via "www.domain.com/es/es/page1.html) instead of via url (i.e. www.domain.com/es/page1.html). What am I doing wrong to avoid the extra language declaration (ie. ...com/es/es/)?

Also, how can I set "www.domain.com/es/" when typed in the URL to point to the home page's Spanish version? or even "www.domain.com/en/" to point to default English?

Thank you in advanced for your help!

Typo3 Setup Script
**************************************************************************
# Multi Language, set ENGLISH as default language
config.linkVars = L
config.sys_language_uid = 0
config.language = en
config.locale_all = en_US
config.htmlTag_langKey = en-US

# Second Language SPANISH setup
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = es
config.locale_all = es_ES
config.htmlTag_langKey = es-US
[end]

# Prepare URL re-writing
config.simulateStaticDocuments = 0
config.baseURL = http://www.domain.com/
config.tx_realurl_enable = 1

# Cleanup Condition settings
config.redirectOldLinksToNew = 1
config.prefixLocalAnchors = all


Typo3 localconf.php  RealURL configuration 

**************************************************************************
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array (
        'useCHashCache' => 0,
        'enableCHashCache' => '1',
        'enableUrlDecodeCache' => '1',
        'enableUrlEncodeCache' => '1',
        'appendMissingSlash' => 'ifNotFile',
        'adminJumpToBackend' => '1',
        'rootPageID' =>  1,
        ),
    'preVars' => array (
        array (
            'GETvar' => 'L',
            'valueMap' => array (
                'en' => '0',
                'es' => '1',
                ),
            'noMatch' => 'bypass',
            ),
        ),
    
    // Configuration of the id-to-path transformation method    
    'pagePath' => array (
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => '5',
        'rootpage_id' => '1', // website's root page ID
        ),
    'fileName' => array (
        'defaultToHTMLsuffixOnPrev' => true,            
        ), // End fileName
    ); // End RealURL configuration


.htaccess setup

**************************************************************************
# If your ISP provides php5 but the server is running on php4

AddHandler application/x-httpd-php5 .php



# Enable URL rewriting

RewriteEngine on

RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]

RewriteRule ^/(|typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/.*$ - [L]

RewriteRule ^typo3$ typo3/index_re.php [L]



# Do not rewrite files, sym links, or directiories if they exist

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l



# Force append a '/' to the url if it is not a file

RewriteRule ^/*(.+/)?([^.]*[^/])$ http://%{HTTP_HOST}/$1$2/ [L,R=301]



# Main URL rewriting.

RewriteRule .* index.php [L]



# HotLink protection - prevent other websites from directly linking to files on website.

RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]

RewriteCond %{HTTP_REFERER} !^http://www.domain.com$ [NC]

RewriteRule .*\.()$ http://www.domain.com [R,NC]



# Make sure that directory listings are disabled

Options -Indexes


      ____________________________________________________________________________________
Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/


More information about the TYPO3-english mailing list