Bug #87095

Robots.txt not reachable if base is not "/"

Added by André Schließer 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-07
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you don't have any language with base: / configured, the static route of robots.txt is no reachable.

In the example below I have two languages configured. Every language is prefixed with two letter country code. So http://intro.ddev.local/ is redirected to http://intro.ddev.local/en/ as it is the default language. Exectly the behavior I like to have for all pages.

Now there is the robots.txt in routes which doesn't have any language prefix (as it needs to be in the docroot). If I try to open http://intro.ddev.local/robots.txt i get redirected to http://intro.ddev.local/en/. And http://intro.ddev.local/en/robots.txt throws an page not found error.
I added two other Text routes which are prefixed with language codes and they are reachable: http://intro.ddev.local/en/mytext.txt http://intro.ddev.local/de/meintext.txt

rootPageId: 1
base: 'http://intro.ddev.local/'
languages:
  -
    title: English
    enabled: true
    languageId: '0'
    base: /en/
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-US
    direction: ''
    flag: us
  -
    title: German
    enabled: true
    languageId: '2'
    base: /de/
    typo3Language: de
    locale: de_DE
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ''
    fallbackType: strict
    flag: de
errorHandling: {  }
routes:
  -
    route: robots.txt
    type: staticText
    content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*" 
  -
    route: en/mytext.txt
    type: staticText
    content: "Static text EN" 
  -
    route: de/meintext.txt
    type: staticText
    content: "Static text DE" 


Related issues

Related to TYPO3 Core - Bug #86835: Static route sitemap.xml is still not working on single-page tree New 2018-11-02

History

#1 Updated by Georg Ringer 10 months ago

  • Status changed from New to Needs Feedback

IMO duplicate of #86835, correct?

#2 Updated by Georg Ringer 10 months ago

  • Related to Bug #86835: Static route sitemap.xml is still not working on single-page tree added

#3 Updated by André Schließer 10 months ago

Yes that is correct. Sorry for creating a duplicate.

#4 Updated by Georg Ringer 10 months ago

  • Status changed from Needs Feedback to Closed

closed as duplicate

Also available in: Atom PDF