Typo3 9.5.0中的真实URL

时间:2018-10-20 08:01:10

标签: typo3

如何获得类似网址的

expample.com/home.html
在Typo3 950中是

? Typo3仅创建

之类的URL。
expample.com/home

没有.html

2 个答案:

答案 0 :(得分:2)

您可以通过在路由站点配置config.yaml中添加路由增强器来定义默认页面类型。

routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: '.html'
    map:
      '.html': 0

另请参见此处https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.5/Feature-86160-PageTypeEnhancerForMappingTypeParameter.html

有关config.yaml文件的更多信息,请参见https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/SiteHandling/Basics.html

答案 1 :(得分:0)

将此代码添加到config.yaml:

  routeEnhancers:
    PageTypeSuffix:
      type: PageType
      default: '.html'
      map:
        '.html': 0

然后在站点管理中添加从index.html到example.com的重定向