Can a wildcard be used when setting a redirect e.g. for mysite.com/review/% ?
Can a wildcard be used when setting a redirect e.g. for mysite.com/review/% ?
This is not supported by redirect in Backdrop. You have to do it at server level. The same question arose in Drupal: https://www.drupal.org/project/redirect/issues/2562455
You could port https://www.drupal.org/project/match_redirect. It can redirect from a wildcard to a single path.
Thanks for the definitive answer, though I find it a bit disappointing that redirect will not do this. I have had a look at the drupal.org reference and also the module match_redirect but unfortunately its limitation to redirect to a single path does not meet my need. So I am using redirects in the site's .htaccess file, like this
# Nodes and files moved to newsite.com RewriteRule ^/?bookreviews/(.*)$ https://www.newsite.com/review/$1 [R=301,L] RewriteRule ^/?files/audio/(.*)$ https://www.newsite.com/files/audio/$1 [R=301,L]
'bookreviews' is actually a view (page) on the original site, now superseded by a similar view 'review' on the new site. The wildcard is the NID for each book review content.
Turns out the module I mentioned was already ported https://backdropcms.org/project/match_redirect
This is not supported by redirect in Backdrop. You have to do it at server level. The same question arose in Drupal: https://www.drupal.org/project/redirect/issues/2562455