I thought there was a hook_page_not_found() but I'm wrong.

I have a list of nodes that I want to end of life. They should be replaced by a 410 Gone status and common text explaining our end of life policy. In other words, I don't want to just unpublish them and let the 404 page show up.

I don't want to impose a burden on every page load, which is why I wanted to tap into page not found.

Is there a way to do this?




im not sure about forcing a 410.. but you can specify custom 404 pages...

no reason you couldnt do something like this:

Add a checkbox to nodes
when unpublishing for the nodes in question, make sure this box is checked
Custom 404 page checks the node attempted, if said node has the checkbox set, display a given messege, otherwise display default.

A simple custom module can do that :)

Issue solved? Add [Solved] to the issue title.
For further support or projects contact me.

The Communications Group