![]() Gotourl () uses the Setgotourl () URL string) to construct the URL and perform the redirection.įinally, you can use Getredirecturl () at any time to determine the current redirection URL. Gotoroute () uses Setgotoroute () (Routing assembly route-assembly) to build URLs and perform redirects. Gotosimple () uses Setgotosimple () (similar to _forward () APIs) to build URLs and perform redirects. In addition, there are a number of methods in the steering gear to perform the actual redirection. This option is currently closed by default, and future versions may be turned on by default. When this option is set, a complete URI is formed using the URL specified by $_server[' http_host ', $_server[' server_port ' and $_server[' HTTPS ', and the redirection method. Setuseabsoluteuri () forces the redirector to use an absolute URI when redirecting. ![]() Setprependbase () in front of the URL specified by Setgotourl (), Gotourl (), or Gotourlandexit (), joins the base URL of the requested object. Setgotourl () sets the default URL, which is used when no arguments are passed in to Gotourl (). By passing in a key/value array and a router name, it organizes the URL based on the type and definition of the router. Setgotoroute () sets the URL based on a registered router. You can use a api:setgotosimple like Zend_controller_action::_forward () ($action, $controller = null, $module = NULL, array $params = Array ()) Setgotosimple () sets the default URL, which is turned to when no arguments are supplied to the Gotosimple () method. Setexit () enforces the exit () method after redirection. Setcode () sets the HTTP response code used during redirection. params) interface.Ī redirector has a number of methods that affect redirect behavior: For example, it is possible to pre-configured the entire site in the redirector object, or to use a similar gotosimple ($action, $controller, $module, $ zend_controller_action::_forward (). Compared with the _redirect () method, it has many advantages. The steering Gear (redirector) assistant lets you redirect to a new URL using a Redirector Object helper program. Redirector provides another way to implement the Help program to redirect to internal or external pages Share to everyone for your reference, specific as follows: This example describes the Zend Framework action Assistant redirector usage.
0 Comments
Leave a Reply. |