Project

General

Profile

Actions

Bug #87095

closed

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

Added by André Buchmann almost 6 years ago. Updated almost 6 years ago.

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

0%

Estimated time:
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 2 (2 open0 closed)

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

Actions
Related to TYPO3 Core - Feature #89518: Decouple static routes from site configUnder Review2019-10-25

Actions
Actions #1

Updated by Georg Ringer almost 6 years ago

  • Status changed from New to Needs Feedback

IMO duplicate of #86835, correct?

Actions #2

Updated by Georg Ringer almost 6 years ago

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

Updated by André Buchmann almost 6 years ago

Yes that is correct. Sorry for creating a duplicate.

Actions #4

Updated by Georg Ringer almost 6 years ago

  • Status changed from Needs Feedback to Closed

closed as duplicate

Actions #5

Updated by Daniel Goerz about 5 years ago

  • Related to Feature #89518: Decouple static routes from site config added
Actions

Also available in: Atom PDF