---
title: "Drei Sprache, RealURL und IE werden keine Freunde"
url: "https://www.typo3.net/d/60502-drei-sprache-realurl-und-ie-werden-keine-freunde"
source: "typo3.net"
tags: ["TYPO3","Mehrsprachigkeit","Frage","RealURL"]
created: "2007-04-03"
last_reply: "2007-04-03"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Drei Sprache, RealURL und IE werden keine Freunde

TYPO3 › Mehrsprachigkeit · 1 Antwort · gestartet 2007-04-03

## Eröffnungsbeitrag

**Bluto** · 2007-04-03 · [Beitrag #1](https://www.typo3.net/d/60502-drei-sprache-realurl-und-ie-werden-keine-freunde/1)

Hallo,

Sprachumstellung mit Realurl macht Probleme im IE.
Die vorangestellten "Ordner" werden nicht entfernt. Beispiel:
aus
<http://www.homepage.de/de/ordnername/seite.html>
wird im Englischen
<http://www.homepage.de/de/ordnername/en/foldername/page.html>

Im Moment löse ich dies in dem ich <http://www.homepage.de/> in der languageSelect.php der URL voranstelle, aber das kann doch nicht die beste Lösung sein oder?

Ich bin mir recht unsicher was die htaccess-Einstellungen angeht, da kenn ich mich nicht gut mit aus.

Danke für jede Hilfe,
Jan

```typoscript
# RealURL aktivieren
simulateStaticDocuments = 0
baseURL = http://www.homepage.de/
tx_realurl_enable = 1
prefixLocalAnchors = all

config.linkVars = L
config.sys_language_uid = 0
config.language = de
config.locale_all = German
# Nederlands language, sys_language.uid = 1
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = nl
config.locale_all = nl_NL
[global]
# English language, sys_language.uid = 2
[globalVar = GP:L = 2]
config.sys_language_uid = 2
config.language = en
config.locale_all = english
config.htmlTag_langKey = en
[global]
config.sys_language_overlay = 1
```

languageSelect.php

```php
if (!is_object($this)) die ('Error: No parent object present.');

$linkarray = array(
    '0'  => '',
    '1' => '',
    '2' => ''
);
               
$localTempl = new t3lib_TStemplate;

foreach($linkarray as $key=>$lang){
    $LD =   $localTempl->linkData(
        $GLOBALS['TSFE']->page,
        '', // $oTarget
        '', // $no_cache
        '', // $script
        '', // $overrideArray
        '&L='.$key, //.$def['uid'], // $addParams, need the & prefix to work
        '0'
    );
    $linkarray[$key] = $LD['totalURL'];
}

$flags = array();
$flags[] = '<option value="http://www.troijka.com/'.htmlspecialchars($linkarray[0]).'" globals="" tsfe-="">sys_language_uid==0?'selected':'').'>Deutsch</option>';
$flags[] = '<option value="http://www.troijka.com/'.htmlspecialchars($linkarray[1]).'" globals="" tsfe-="">sys_language_uid==1?'selected':'').'>Nederlands</option>';
$flags[] = '<option value="http://www.troijka.com/'.htmlspecialchars($linkarray[2]).'" globals="" tsfe-="">sys_language_uid==2?'selected':'').'>English</option>';

$content = '
<form name="Sprungmenue">
  <select name="selectLang" onchange="jumpToLang(this.form);">
     '.implode('',$flags).'
  </select>
</form>';
```

.htaccess

```php
#####
# 
# Example .htaccess file
# 
# This file contains a collection of almost everything you will need
# for optimising TYPO3:
# 
# - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
# - PHP optimisation
# 
# If you want to use it, you'll need to rename this file to '.htaccess'.
# (To make this work you will need to adjust the 'AllowOverride'
# directive in your Apache configuration file.)
# 
# IMPORTANT: You may need to change this file depending on your TYPO3
# installation!
# 
# You should change every occurance of TYPO3root/ to the location where you
# have your website in. For example:
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove 'TYPO3root/')
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
# 
# If you have problems with this file, try using the minimal
# mod_rewrite.htaccess which is located in the typo3_src/misc/
# directory of this installation.
# 
# You can also use this configuration in your httpd.conf, but you'll have
# to modify some lines, see the comments (search for 'httpd.conf')
# 
# Using rewriting in your httpd.conf is much faster, btw.
# 
# Questions about this file go to the matching Install mailing list,
# see http://typo3.org/documentation/mailing-lists/
# 
####

### Begin: Rewrite stuff ###

# Enable URL rewriting
RewriteEngine On

# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9

# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
# 
# If you place this in httpd.conf, you cannot use this directive in any case!
RewriteBase /

# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]

# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

# If the file/symlink/directory does not exist => Redirect to index.php
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Main URL rewriting.

# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.

# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]

# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]

# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]

RewriteRule .* index.php [L]

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

### End: Rewrite stuff ###

### Begin: PHP optimisation ###

# All features below are left to the default if you don't change this.
# Simply remove the comment marks if you want to use some/all of these
# settings

# The PHP developers recommend disabling this feature. Do that.
# It's deprecated and is likely to be unsupported in future versions of PHP.
#php_flag allow_call_time_pass_reference off

# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
#php_flag register_globals off

# PHP may not declare the argv & argc variables (that would contain the GET
# information).
# TYPO3 doesn't need this, so just turn it off.
#php_flag register_argc_argv off

# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
#php_flag magic_quotes_gpc off

# Order in which PHP registers GET, POST, Cookie and Built-in variables
#php_value variables_order GPCS

### End: PHP optimisation ###

### Begin: Miscellaneous ###

# Make sure that directory listings are disabled
#Options -Indexes

# There is a problem with Internet Explorer and mod_gzip on Apache servers.
# For more information, see
# http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
#mod_gzip_item_exclude file \.css$
#mod_gzip_item_exclude file \.png$
#mod_gzip_item_exclude file \.gif$
#mod_gzip_item_exclude file \.jpg$
#mod_gzip_item_exclude file \.jpeg$
#mod_gzip_item_exclude file \.js$

### End: Miscellaneous ###

# Add your own rules here
# ...
```

## Antworten

### [#2](https://www.typo3.net/d/60502-drei-sprache-realurl-und-ie-werden-keine-freunde/2) · einpraegsam.​net · 2007-04-03

Sorry, aber wie machst du die Sprachumschaltung?

---

Quelle: „Drei Sprache, RealURL und IE werden keine Freunde“, typo3.net, https://www.typo3.net/d/60502-drei-sprache-realurl-und-ie-werden-keine-freunde
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
