Please examine and correct this code:
I want the code to work such that if somebody visits https://example.com/music/?record_year=2022
, it should be https://example.com/music/record_year/2022
instead.
# To externally redirect https://domain.com/music/?record_year=2022
RewriteCond %{THE_REQUEST} /music/?record_year=([^\s&]+)&l=([^\s&]+)\s [NC]
RewriteRule ^ music/%1/%2/? [R=301,L,NE]