[TYPO3-english] Realurl, default language and 404 page

Dmitry Dulepov dmitry at typo3.org
Mon Feb 9 11:45:09 CET 2009


Hi!

Pascal Cramer wrote:
> However, removing this statement causes Realurl to resolve invalid url's
> without any language prevar to the homepage.
> For example http://www._domain_.com/en/non_existing_page.html is
> 'thrown' to the defined [FE][pageNotFound_handling] but
> http://www._domain_.com/non_existing_page.html wil result in the
> homepage being presented (with a http response code 200)

For me RealURL shows 404 page, not the home page. Are you sure you posted full configuration?

> I have been through the Realurl manual and Google several times but
> perhaps I missed something or have I been searching for the wrong things?
> 
> 2. Another thing are the redirects for the country-specific domains.
> We would like to redirect only the 'bare' tld-requests to their
> corresponding language, for example http://www._domain_.nl/ should be
> redirected to http://www._domain_.com/nl/, any other requests on the .nl
> domain should be handled through [FE][pageNotFound_handling]
> (fb_old2newredirects)

Use mod_rewrite for it. Using PHP+TYPO3+RealURL is very inefficient way. Here is an example:

RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$
RewriteRule ^(nl/)?(.*)$ http://example.com/nl/$1 [L,R]

-- 
Dmitry Dulepov
TYPO3 core team
"Sometimes they go bad. No one knows why" (Cameron, TSCC, "Dungeons&Dragons")


More information about the TYPO3-english mailing list