How to use Rules to redirect a user based on URL argument? I'm using Drupal 7 and the Drupal Commerce module. I'm now able to capture an argument passed by URL using Rules (thanks to this helpful thread). However, I'd now like to be able to redirect the user to one page if the argument equals one thing and send them to a different page if it equals ANYTHING else. Anyone know how to do that?

I tried using 'Page Redirect' as an action in Rules, after the action of capturing the argument in the URL (Action > Provide URL argument value), but there's no option in the Page Redirect action to send users somewhere based on the argument value.

So for example, I have users coming to the site with urls like so:

membership-renewal/?ID=promo1


Currently Rules is recognizing that they are using that URL and it's reading 'promo1' value using [ID:value] replacement pattern...I can print it out to the screen so I know it's reading it.

But I don't know how to then use that value to inform a page redirect for example.

Anyone know?
Well, if you're planning on doing it solely via rules, you can create a new rule for each if in your logic and then just set them to be actions one after the other. Something like this: 

Action:
  RULE: 
    IF: &lt;condition&gt;
    REDIRECT: &lt;here&gt;
  RULE: 
    IF: &lt;condition&gt;
    REDIRECT: &lt;here&gt;
  RULE: 
    IF: &lt;condition&gt;
    REDIRECT: &lt;here&gt;


This would effectively work like an if-elseif-else statement (assuming that the redirection is using drupal_goto().

But really, this sounds like a job for a custom action that takes the parameters and includes your own custom logic. It'd probably be a lot cleaner in the long-run.