Change the rewrite rule as follows:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^([^/]+)/?$ index.php?id=$1 [L,QSA]
A key change is the use of the QSA flag, which will keep the original query string even after adding id=$1 .
source share