Template directive: redirect 2.6+

The @redirect() directive is similar to the redirectTo() function. It can be used within template files to redirect from one template file to another url. We do not need to define the domain path if it is not an external link. Only the relative path of the url is expected to be defined. An example is shown below:
sample.rex.php
  <!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Sample</title>
      @redirect('docs/wvm/template/directives/redirect')
  </head>
  <body>
      
  </body>
  </html>
                        
The supplied path above will redirect to the current url address of this page. This directives helps to redirect users from old urls to new pages rather than entirely removing the link.