If the question here can be translated to something like "How to redirect to frontpage when trying to visiting a node that has been deleted before?", then there are 2 options to do so, as detailed below.
Option 1: Use the Rules module
Assume the path of the "Default 404" page is set to
not_found (via admin). And assume your homepage has a path like
Then create a rule using the Rules module, with as Event something like "After visiting node
not_found". So that the entire rule would look something like so:
- Rules Event: After visiting node
- Rules Action: Page redirect -
Parameter: URL: my_homepage
Should you want to do so, you could also add another Rules Action to also display some (informational) message in the Drupal message area, with something like "You tried to visit a page which has been deleted, which is why we're showing you the homepage instead".
Option 2: Use the CustomError module
The CustomError module allows the site admin to create custom error pages for HTTP status codes 403 (access denied) and 404 (not found), without creating nodes for each of them. Some of its features are like so (from its project page):
- Configurable page title and descriptions.
- There are no author and date/time headers as with normal nodes.
- Any HTML formatted text can be put in the page body.
- The error pages are theme-able.
- Users who are not logged in and try to access an area that requires login will be redirected to the page they were trying to access after they login.
- Allows custom redirects for 404s.
Note the part about "Allows custom redirects for 404s.", which I believe is what you're looking for.