I am looking to create a redirection flow-through on a website that can take a URL such as:
https://example.com/go/asset?tag=1234567
And can redirect it to:
https://newexample.com?asset=1234567
I think I might be close, but can't seem to get it working:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} /go/asset$
RewriteCond %{QUERY_STRING} tag=\d{7}
RewriteRule ^(.*)$ https://newexample.com?asset=%1 [R=301,L]
</IfModule>
I saw a few similar examples that have informed my attempt, but nothing specific to my use case. Many thanks in advance!