PHP or htaccess make dynamic url page to go 404 when item is missing in DB
Typical scenario: DB items are displaied in page http://...?item_id=467 User one day deletes the item Google or a user attempts to access http://...?item_id=467 PHP diggs into DB and sees items does not exist anymore, so now PHP must tell Google/user that item is not existing via a 404 header and page. According to this answer I undertstood there is no way to redirect to 404 Apache page via PHP unless sending in code the 404 header + reading and sending down to client all the contents of your default 404 page. The probelm: I already have an Apache parsed custom 404. shtml page, so obvioulsy I