Using the Rules module you can implement a rule that looks like so:
{ "rules_redirect_all_node_aliases" : {
"LABEL" : "Redirect all node aliases",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "init" : [] },
"IF" : [
{ "text_matches" : {
"text" : [ "site:current-page:path" ],
"match" : "blog\/about-author?page",
"operation" : "starts"
}
}
],
"DO" : [
{ "redirect" : { "url" : "blog\/about-author" } }
]
}
}
It will redirect any path starting with blog\/about-author?page
to a path named blog/about-author
. So this will "redirect any such paths but with different query strings/parameters to the same url" (as in your question ...).
To experiment with this rule in your own site, just copy the entire Rules code above, and paste it in a new Rule in your own site, created via the "Import" function (available if you have the Rules UI enabled).
But wait, there is more ...
You could also check if page
was specified as an URL argument. And make the actual value specified for such argument (like in your question: the 1
, 2
or 3
after page=
) available as a new variable to Rules. To do so, use the Rules URL Argument module. Here is a quote about it (from its project page):
... provides two rules conditions based on URL arguments:
- check if a URL argument is present.
- compare the value of an URL argument.
It also provides an action that makes the value of an URL argument available as new variable to Rules.
The newly provided Rules actions and conditions can be found under the "URL Argument" conditions and actions groups in the rules configuration interface.
For an example of how to use it, refer to Comment # 3 in issue # 1686360 which is about "Pass an amount to the url, ie; site/content/node-title?amount=10 or /node-title?=amount:10". Here is the relevant part of it:
- add a "Check if URL argument exist" condition to your rule and set the "ARGUMENT" value to "amount".
- add "Provide URL argument value" action to the rule and set "URL ARGUMENT NAME" value to "amount" and in the "Provided variables" section "ARGUMENT FROM URL - Variable name" to e.g. "
amount_from_url
".
You will now be able to use the amount value as a variable "amount-from-url
" for other actions in this rule.