[TYPO3-english] mod rewrite redirecting when no language is set in url

jochem nabuurs jochem at roquin.nl
Wed Feb 24 17:45:37 CET 2010


Hi list,

i've developed a multilingual website for a client of ours.
The site is available in english (en), dutch (nl) and german (de).
What i'd like to do is to always provide a language setting in the url.

When a page is being requested, f.e. 
http://www.domain.com/portfolio.html, we'd like the page to redirect to 
http://www.domain.com/en/portfolio.html by default.


I'd really like to do this with .htacces but I haven't got much 
knowledge on mod_rewrite... I'm using Realurl for nice urls.

I've tried the following:

# This does not work
RewriteRule !^(en|nl|de)/(*)	http://www.domain.com/en/$2 [L]

# This DOES work
RewriteRule !^(en|nl|de)/(*)	http://www.google.com [L]

# Default
RewriteRule (.*)		index.php [L]


I've been struggling with this for a while now and i really hope someone 
can help me out here.

Thanks in advance!

Kind regards,

Jochem Nabuurs


More information about the TYPO3-english mailing list