I am trying to make a .htaccess redirect rule to achieve the following
https://www.example.net/index.php?a=in&u=testUser&api_key=4r98f4r98f&ip_address=127.0.0.1
TO
https://www.example.net/api.php?ip=127.0.0.1&username=testUser
but i can't make it work, any hint?
RewriteEngine on
RewriteCond %{QUERY_STRING} ^a=([^&]+)&u=([^&]+)&api_key=([^&]+)&api_key=([^&]+)&ip_address=([^&]+)$ [NC]
RewriteRule ^index\.php$ https://www.example.net/api.php?ip=%5&username=%2? [NC,L,R]