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 · 861 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 weeks ago
2 307 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago