Clarification “redirect” in kohane 3.3.5



  • Based on http://kohanaframework.org/3.3/guide/kohana/upgrading#redirects-http-300-301-302-303-307 function .Redirect”, I
    He wrote:

    $this->redirect("http://".$_SERVER['HTTP_HOST']."/accountC", 302);
    

    To switch to the "accountC " page.
    Transition Works.
    But the record isn't very good.
    1♪ Did I write right?
    2♪ There was a method.::base" https://kohanaframework.org/3.3/guide-api/URL#methods which enables the basic url, but I've only been able to get a / (right slash).



  • If you need to redirect the address inside the current domain, you can use the following design:

    $this->redirect('/accountC', 302);
    

    And in the configuration file. system/config/url.php Add the website's domain.

    return array(
        'trusted_hosts' => array(
            'sitedesigner',
        ),
    );
    

    As long as the sitedesigner is the domain of your website.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2