Bug #87095
closedRobots.txt not reachable if base is not "/"
0%
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"