How to redirect to frontpage when a node is deleted? In my client's site it is normal to delete some posts (or old posts), but I don't want a 404 error page. Instead I want the user/visitor to be redirected to the frontpage with a 301 error code. 

I have installed the Redirect module, but I have not found any option for this.

I have the Rules module installed and I can create custom module rule if I need.
I found the module Save Redirect on Delete which looks like it addresses your problem. From the description: 


  The Save Redirect On Delete module gives the functionality for saving redirects after deletion of entity(supported by pathauto module) having some url alias.


I haven't tried it myself but would be interested to know if it helps.