I have a quite simple need : to redirect any request to a single file.
So I put, at my apache directory root, a .htaccess :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ index.php?q=test [L,QSA]
</IfModule>
All the requests are indeed redirected to index.php but a wierd thing appears : the PHP $_SERVER['QUERY_STRING'] contains q=test&q=test showing that the redirection occurs twice (and the REDIRECT_URL doesn't contains index.php but the passed URL leading to it being equal to REQUEST_URI.
How can I fix that, considering that I have only .htaccess way to configure Apache ?
Testing :
Apache version : 2.4.33 ; PHP version : 7.2.4 (& 5.6.35) ; WAMP (Win) & Red Hat (Linux).