Implement 301 redirects into htaccess

Job ID: 31278527

Budget: $250 – $750 USD

I have many redirects created that need to be implemented into htaccess file. However I cannot get it working. I believe this is because there is query string in the .htaccess file which the 301 rewrite rule ignores.

Examples:
Redirect 301 https://digimoncard.io/deck/?deckid=1 https://digimoncard.io/deck/digimon-green-deck-1
Redirect 301 https://digimoncard.io/deck/?deckid=2 https://digimoncard.io/deck/digimon-red-deck-2
Redirect 301 https://digimoncard.io/deck/?deckid=3 https://digimoncard.io/deck/digimon-yellow-deck-3
Redirect 301 https://digimoncard.io/deck/?deckid=4 https://digimoncard.io/deck/digimon-blue-deck-4

And so on.
Help correctly creating the rules to insert these would be much appreciated.
Related categories: PHP JavaScript Linux Apache HTML