I build a website for a client of mine, that is going to continuously host events for his area.
One of the requirements he has is to expire and remove from the database the events already completed.
The events will belong to
The question is, how I could redirect with
301 the search engines and the visitors to the parent category of each event?
So let's say we have the categories
If I have an even for theater, and the event is expired + removed from the DB, how can I make the redirect to the
theater category for all the upcoming visitors?
What if I make a custom table to record the slugs of the events and the category IDs when an event is deleted, and then when I have a 404, to check the DB table for the requested slug and make a redirect using the category ID?
Could that solution be performant given that the site is going to host a few million of events?