URL/path reactions
Last updated on
30 November 2019
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
When a visitor requests a page on your website with a certain URL or path, you can trigger an action.
For example, you might want to:
- Redirect from an old page to a more relevant page,
- Redirect from a user page to a profile page,
- Redirect from deleted nodes of a specific content type to a specific page, or
- Show a system message about that page.
To set up the Rule that responds to the URL or path, use one of these Events:
- "Content is viewed",
- "Drupal is initializing" (for non-entities), or
- other specific implementations like Rules Bonus Pack's Page Manager integration "Create a Rules event for this variant".
Use the Condition: "Text comparison" with the data selector [site:current-page:path]
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion