Whatever you want to happen via Rules module when some link is clicked, if you're using Rules Event 'Content is viewed
', you'll probably be too late:
- the content (or whatever the clicked link is about) is already being shown, so if the Rules Conditions are satisfied, the Rules Actions will be performed. That is what 'Content is viewed' is all about.
- if you didn't want to content (or whatever the clicked link is about) to be visible at all, well sorry, but you're too late.
If however you did want something to happen BEFORE showing the content (or whatever the clicked link leads to), then you should use Rules Event 'Drupal is initializing
'. Refer to 'How to specify a Rules event like "Content is 'going to be' viewed"?' for way more details on this.
Attention: Rules Event 'Drupal is initializing
' gets triggered on every (repeat: every) page load in a Drupal site. So for performance reasons, you really want to limit the number of active Rules that use this Rules Event to an absolute minimum, i.e. as your last resort (if anything else fails).