Issue Bug Closed

#86615Static route sitemap.xml is not working on single-page tree

Chris Müller 10/10/18, 10:50 updated 05/07/19, 12:14

Description

I have a single-page tree site configuration. I added a sitemap.xml into the config.yaml via the new Site Management menu.

When I’m calling the /sitemap.xml URL I got a redirect to the default language URL (in my case /en).

My config.yaml:

rootPageId: 3
base: 'https://www.example.net/'
baseVariants:
  -
    base: 'http://example.ddev.local:8080/'
    condition: 'applicationContext == "Development"'
  -
    base: 'https://staging.example.net/'
    condition: 'applicationContext == "Production/Staging"'
  -
    base: 'http://testing.example.net/'
    condition: 'applicationContext == "Testing"'
languages:
  -
    title: English
    enabled: true
    languageId: '0'
    base: /en
    typo3Language: default
    locale: en_US.utf8
    iso-639-1: en
    navigationTitle: English
    hreflang: en
    flag: us
  -
    title: Deutsch
    enabled: true
    languageId: '1'
    base: /de
    typo3Language: de
    locale: de_DE.utf-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de
    fallbackType: strict
    flag: de
errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=96'
routes:
  -
    route: sitemap.xml
    type: uri
    source: 't3://page?uid=3&type=1533906435'                                             

Calling /?type=1533906435 redirects me also to /en. But using /en?type=1533906435 shows me the sitemap index. Calling the URL from the sitemap xml:

https://staging.example.net/en/?page=0&sitemap=pages&type=1533906435&cHash=21d6f07b968ea92541bad77cc36de6f0

shows me the content from /en and no sitemap.

I can reproduce the problem on a local ddev container with nginx, also on a webserver with Apache.

*Edit:*
I had a similar issue with a robots.txt static route. I defined it via the Site Management module and got a redirect to the start page of the default language.

Reviews 1