I'm building a script that every now and then crawls through an online story archive and detects when a story has been deleted. However, when a story is deleted, I discovered that going to the story's URL does not return a HTTP 404 response code. Instead it redirects to a custom "Page not Found" page, and returns the 200 OK response code. This means that, unlike my original idea, I can't just check for a 404.
What is the best way to detect these redirect 404's without detecting any false positives?