【问题标题】:TYPO3 9.5 redirectTYPO3 9.5 重定向
【发布时间】:2019-12-19 21:00:03
【问题描述】:

在 9.5 之前,我使用 sys_domain 来重定向域。

例如:我有一个域 example.com,并将重定向设置为 example.info
当用户调用example.com/contact 时,它会重定向到example.info/contact

现在,使用 TYPO3 9.5,它不再工作了。为该域设置重定向(源路径:/,尊重获取:否,正则表达式:否)并调用 example.com/contact 时会引发错误。 将设置更改为 regex: yes & 源路径(.*?) 时,它只是重定向到example.info - 联系人被忘记了。

有没有办法恢复“旧”功能?

【问题讨论】:

    标签: typo3 typo3-9.x


    【解决方案1】:

    无法使用重定向模块自动将源路径添加到目标路径。只需通过 .htaccess 重定向此类域:

    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} ^example\.com$ [or]
    RewriteCond %{HTTP_HOST} ^www\.example\.com$
    RewriteRule ^(.*) https://example.info/$1 [L,R=301]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-21
      相关资源
      最近更新 更多