This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

aleXela
aleXela

Hey, i'm trying to redirect from component if id from slug is wrong.

running from layout

function onBeforePageStart(){ $this->Contentloader->getMeta(); }

in component i have:

public function getMeta(){

//id checking logic goes here

if ($id == null) return Redirect::to('/'); }

Inspecting the dd(Redirect::to('/')) object I see statusCode: 302, content: html with "redirecting to ...." But it's not redirecting. Please advice Thanks

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.