my problem is really silly and i know I must be missing something. All I want to do is redirect a user based on the type of node being viewed.

Here is what I tried with rules: Event: content is viewed

Condition: Content is of type: my desired type

Action: Path redirect: my desired url

Problem: when i search for anything using the search form, I always get redirected to the url I specified in the Action part of the rule.

Please let me know how to get around this

1 Answer 1


That's happening because you're reacting on the content is viewed event, which means everytime a content of the type you're describing in the conditions is displayed. You need to extend more those conditions to add the search context.

You can either compare with the site path with a "Data comparison" condition on site:current-page:path to node/[node:nid]

A better solution would be to filter out the view mode, I'm guessing you're looking for reacting on the "Full" view mode of the node, so just add a "Data comparison" condition on view-mode and set it to Full content

Something very similar has been answered before in: How to set Rules event for "Content is viewed" from excluding Teaser view?

In any case, if you want a node type to not have a final page, I recommend the Rabbit hole module.

  • thank you for your very clear guidance my friend. ill have a look at these options and get back to you ASAP Jun 22, 2014 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.