The first redirect would be handled via server rewrite that looks like:
The question mark on the end strips any previous query string. This redirect would occur in the htaccess above the URI management rewrites. The subsequent request would be caught by URI management and handled in the way the store has been set.
Code:
RewriteCond %{QUERY_STRING} page=storecode/PROD/(.*)/(.*)
RewriteRule ^.*$ https://www.domain.com/%2.html? [R=301,L]
Comment