【问题标题】:Sylius redirect to specific URLSylius 重定向到特定 URL
【发布时间】:2018-12-02 12:06:06
【问题描述】:

我有一条路线:

some_route: path: /add/{token} methods: [GET, POST] defaults: _controller: someController:createAction _sylius: template: 'sometwig.html.twig' redirect: 'HERE I WANT TO REDIRECT TO URL F.E. wwww.google.com

我想重定向到特定的 url,但据我所知,您只能在重定向字段中指定另一个路由名称,而不是特定的 URL,所以如何重定向到特定的 URL f.e. www.google.com?

`

【问题讨论】:

    标签: php symfony sylius


    【解决方案1】:

    redirect 属性只能重定向到内部 symfony 路由,你只能制作总是重定向到外部绝对 url 的自定义路由

    【讨论】:

      猜你喜欢
      • 2018-02-15
      • 2013-06-12
      • 2020-07-24
      • 1970-01-01
      • 1970-01-01
      • 2017-02-20
      • 1970-01-01
      • 2015-07-29
      • 1970-01-01
      相关资源
      最近更新 更多