You cannot match a query string in a RewriteRule , you need to match it with the variable %{QUERY_STRING} in a RewriteCond . However, if you just want to add a query string, you can simply use the QSA flag:
RewriteRule /cia16(.*) /cia/$1?CIA=16 [QSA]
URI: /cia16/steps.php?page=1 will be rewritten to /cia/steps.php?CIA=16&page=1 . If for some reason you need page=1 to CIA=16 , you can do something like this:
RewriteRule /cia16(.*) /cia/$1?%{QUERY_STRING}&CIA=16
source share