Based on http://kohanaframework.org/3.3/guide/kohana/upgrading#redirects-http-300-301-302-303-307 of the “ Redirect ” function, I
Posted by:

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

To go to the page «accountC».
The transition is working .
But some kind of record - not very.
1 . Did I write it correctly?
2 There was also a method " :: base ", https://kohanaframework.org/3.3/guide-api/URL#methods , giving the opportunity to get the base ur l, but I only got to get "/" with it (right slash ).

    1 answer 1

    If you need to redirect to an address within the current domain, you can use the following construction:

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

    And in the system/config/url.php configuration file, add the site domain

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

    Provided that sitedesigner is the domain of your site.

    • Yes, I have already tried, with such a record, I have the error " Kohana_Exception [0]: Untrusted host sitedesigner. If you trust the designer, you’ve been using the url config file. " - Konstantin78
    • Well, actually, the essence is indicated in the error, add the domain of your site to the configuration file - Alexander
    • Completed his answer - Alexander
    • THANKS , created the file " ... \ Endels1_72 \ home \ SiteDesigner \ www \ application \ config \ url.php ", It all worked. And on the second question. there you can get "http: // sitedesigner" using :: base? - Konstantin78
    • so WAIT, and if I move the site to a remote, there the domain name will change, I url.php also then should I change it turns out? - Konstantin78