I would recommend a better solution - instead of directing a customer to the page with the message that the product is no longer available (a rather negative message, you can't but agree), redirect the removed product URL to the page with the related product or content. This way, the chance the customer will not leave your store, but keep browsing it and eventually make a purchase, is much higher.