Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

How to redirect to a 404 error from a plugin

Started by Jean 7 years ago · 1 replies · 832 views
7 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 jean-louis67, 3 days ago
2 79 2 days ago
General · by Andy Miller, 6 days ago
0 144 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 225 2 weeks ago