... with leading / in the target ;)
In localhost-type situations, targets
always begin in / slash -- not only for rewrites (same as on live sites) but also for same-domain redirects if you've got any.
to change link
This wording makes me a little uneasy. There is nothing you can do in Apache to change a link. Those are created within the page; you have to either hard-code the desired link, or set up your php-or-equivalent to produce links in the form you want. All you can do in the server is look at incoming requests and then
(a) serve content from the requested directory and file
(b) rewrite to serve content from somewhere else on the same server
(c) redirect to tell the browser to make a fresh request
On a live site, you would probably need two rules:
one internal rewrite to take the pretty /1/2/ URL and fetch content from blahblah.php?foo=1&bar=2
and
one external redirect to take requests for blahblah.php?foo=1&bar=2 and force them to request /1/2/ instead.
But if it's a brand-new page with URL that nobody has seen before, you may be able to dispense with the external redirect.
Incidentally, this form
/mysite/?var1=1&var2=2&var3=3
doesn't make much sense as a rewrite target. It will work, but you're forcing the server to take an extra step by invoking mod_dir. What you really want here is
/mysite/index.php?var1=1&var2=2&var3=3
Since it's an internal rewrite, nobody will ever see the "index.php" part.