Drupal 7 system redirect through rules module

2019-06-13 13:15发布

问题:

I hope someone might be able to clarify exactly what the rules module for Drupal 7 does when it executes a system redirect. I've created a rule (through the rules module in Drupal 7) which executes a redirect whenever specific content is accessed. The rule does not appear to be generating an apache redirect, and the rules module does not specify the type of redirect it is executing (301, 302, etc). Ultimately, my concern is getting in trouble with search engines for cloaking.

Thank you in advance for any clarification provided!

回答1:

It will be doing a 302 redirect using drupal_goto()

Sends the user to a different Drupal page. This issues an on-site HTTP redirect. The function makes sure the redirected URL is formatted correctly.

The Rules module calls drupal_goto() in rules_page_rebuild().