We've recently made a change on one of our sites where a ton of URLs need to be redirected via htaccess but we also need to account for any additional information that may be appended after the URL.
I can get the specific URL to redirect as expected but not with additional characters afterward. I know that sometimes it's important what order rules come in within the file like this thread mentions but there shouldn't be any conflicting rules for these redirects.
These are all specific URLs, so this thread about matching a specific word in the URL structure won't work for our issue.
It doesn't look like the FOO/BAR/BAZ to FOO/NEW/BAZ example is applicable either.
I thought that our caching might be impacting it but other changes were implemented right away, so I think it's just a question of syntax
Current formatting example URL in our htaccess:
Redirect 301 /product/product-name/ https://example.com/announcements/
What Needs To Happen: Any incoming direct links that folks have for /product/product-name/ that include anything after the trailing slash such as /product/product-name/ref/123/ should also be redirected to /announcements/ but this is not the case, these types of links are going to our 404 page.
Attemped Solutions: So far (today - this isn't the first time I've tried this), I've tried the following to wildcard my 301's with no success:
SO question: Wildcard redirect at end of url in .htaccess
SO question: Wildcard RewriteRule for 301 redirects in htaccess
External reference: https://bootstrapcreative.com/how-to-redirect-known-pages-and-catch-all-for-everything-else-htaccess/
I'm open to suggestions & appreciate any advice!