Kelly Bell
Kelly Bell

Reputation: 41

Drupal - need redirect to specified page when node is deleted

I'm using the pathologic module, and currently when a node is deleted users will get a 404 error. I want to set up a Rule such that when ANY node is deleted, a redirect is put in place to send users looking for that path to the HOME page.

Do I need Rules for this, and if so, what is the best method? I haven't been able to successfully get this to work so far because of the interaction between the nid and the pathologic-created redirect. Many of my users have been sent URLs in email, etc. and I don't want them to get a 404.

Thanks in advance!

Upvotes: 0

Views: 470

Answers (1)

user3563097
user3563097

Reputation: 179

One soulition could be for you:

  1. install https://www.drupal.org/project/hook_post_action module
  2. write your own module in which you implement hook_node_postdelete($node) in which you set a drupal_goto()

Upvotes: 0

Related Questions