On the first RewriteRule, (the Pattern) is matched against the (%-decoded) URL-path (or file-path, depending on the context) of the request. Subsequent patterns are matched against the output of the last matching RewriteRule.
this means you will never match your pattern with the hostname or the query string. if you have that requirement you can use a RewriteCond directive and match against the HTTP_HOST or QUERY_STRING server variables.
your use of the $1 in the Pattern is incorrect syntax. the $1 is intended to be used as a back-reference variable in the Substitution string. assuming your intention was to end-anchor the Pattern, that's just a dollar sign ($) without the digit.