Trouble with rewrite rule and passing along the query string

Giganews Newsgroups
Subject: Trouble with rewrite rule and passing along the query string
Posted by:  laredotornado (laredotorna…@zipmail.com)
Date: Wed, 9 Jun 2010

Hi,

I'm using Apache 2.2 on Mac 10.6.3.  I want to construct a rewrite
rule such that if someone visits my root directory, they are
redirected to another page and any query string data that may be
appended will also be passed along.  So, if someone types

http://mydomain.com/?p=1&p=2

then the new URL they would see is

http://mydomain.com/dir/index.jsp?p=1&p=2

I tried this, but without success ...

RewriteRule ^/ /vegas/index.jsp?%{QUERY_STRING}

Any other ideas?  Thanks, - Dave

Replies