Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to redirect to a 404 error from a plugin

Started by Jean 8 years ago · 1 replies · 1066 views
8 years ago

you need to declare your function in getSubscribedEvents() function

then

TXT
public function onPageNotFound(Event $event)
{
// do your stuff

}

you can check many plugins use that method
... welcome to Grav Community 😀

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 39 16 hours ago
General · by Hanns Mattes, 1 week ago
0 119 1 week ago
General · by Karmalakas, 1 week ago
2 184 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 234 3 weeks ago
General · by Dima, 4 weeks ago
1 210 4 weeks ago