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

Pascal Cramer pascal at NOSPAMroguesheep.nl
Wed Feb 18 11:08:15 CET 2009


Dmitry Dulepov wrote:
> 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?
> 

Hi Dmitry,

thanks for your time and answer.

Just to be sure it was not the installation or configuration which was causing 
the problems, I've set up a test Multilanguage site with Realurl.
Here I encounter the same behaviour: if I request a non-existing page with the 
language prevar, the directive in [FE][pageNotFound_handling] is followed, but 
when request the same page _without_ the language indication, I end up on the 
homepage.

Compare the behaviour
  http://dev.roguesheep.nl/en/nosuchpage.html
to
  http://dev.roguesheep.nl/nosuchpage.html

Below the TS config and the realurl_autoconf.php

Do you have any clues on how I can get the non-language-prevar faulty page to 
deliver a 404?

As said: I need to remove the 'noMatch' => 'bypass' rule to ensure a language is 
always provided (customer's wish).

Thanks in advance,
Pascal

My config TS:
-----
config {
  baseURL = {$base_url}
  doctype = xhtml_strict
  xmlprologue = none

  simulateStaticDocuments = 0
  tx_realurl_enable = 1
  uniqueLinkVars = L
  linkVars = L
}

###Languages
#dft/nothing specified: nl
config {
  language = nl
  locale_all = nld_NLD
  htmlTag_langKey = nl
}

#English,chosen
[globalVar=GP:L=1]
config {
  language = en
  locale_all = en_EN
  sys_language_uid=1
  htmlTag_langKey=en
}
[end]
-----


And the realurl_autoconf.php:
-----
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
   '_DEFAULT' =>
   array (
     'init' =>
     array (
       'enableCHashCache' => true,
       'appendMissingSlash' => 'ifNotFile',
       'adminJumpToBackend' => true,
       'enableUrlDecodeCache' => true,
       'enableUrlEncodeCache' => true,
       'emptyUrlReturnValue' => '/',
     ),
     'pagePath' =>
     array (
       'type' => 'user',
       'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
       'spaceCharacter' => '-',
       'languageGetVar' => 'L',
       'rootpage_id' => '11',
     ),
     'fileName' =>
     array (
       'defaultToHTMLsuffixOnPrev' => 0,
       'acceptHTMLsuffix' => 1,
       'index' =>
       array (
         'print' =>
         array (
           'keyValues' =>
           array (
             'type' => 98,
           ),
         ),
       ),
     ),
     'preVars' =>
     array (
       0 =>
       array (
         'GETvar' => 'L',
         'valueMap' =>
         array (
           'nl' => '0',
           'en' => '1',
         ),
         'valueDefault' => 'nl',
       ),
     ),
   ),
);
?>
-----


More information about the TYPO3-english mailing list