I get a 404 error page when I try the following rule in htaccess:
RewriteRule ^Test\?service=(.*) test.php?foo=$1 [NC,L]
How come?
I know it’s preferable to use something like ^Test/(.*) test.php?foo=$1 [NC,L] instead, but in this case I’d rather like it the way I stated.
Thank you in advance.
RewriteRuledoes only check the URL path. But the query (the part from the first?up to the first#) is not part of the URL path. That can only be checked with theRewriteConddirective: