Redirecting the web client after deleting an item
There really is not much tangible difference between the two. I think I would not want to introduce a second route that does precisely the same thing as another route. I think it is sufficient to differentiate the redirect behavior based on the request properties.

In first, code example I think $badreferrers is a bad variable name. There is nothing bad about the referrer right? Those refererr values lead to a different redirect.