make redirection in the view

0

How can I redirect to cakephp based on the following code:

<noscript>  
//redirecionamento aqui  
</noscript>  

I'm using:

<noscript>  
<meta http-equiv="refresh" content="1; url=error.ctp">  
</noscript>   

is giving the error that there is no action error in the controller.

The view does not allow $ this-> redirect ();

How do I. I know it's not cake. If someone directs me in this detail too, I am grateful.

    
asked by anonymous 03.06.2016 / 16:54

1 answer

0

Mount the url as follows and replace it with:

$url = Router::url([
    'plugin' => 'seu plugin ou null',
    'controller' => 'seu controller',
    'action' => 'sua action',
    '_full' => true // essa é opcional, se quiser q monte a url completa, coloque como true, senão, só tirar
]);

<noscript>  
    <meta http-equiv="refresh" content="1; url=<?php echo $url ?>">  
</noscript>  
    
22.07.2016 / 21:03