Re: Trouble with rewrite rule and passing along the query string

Giganews Newsgroups
Subject: Re: Trouble with rewrite rule and passing along the query string
Posted by:  Álvaro_G._Vicario
Date: Wed, 09 Jun 2010

El 09/06/2010 15:09, laredotornado escribió/wrote:
> 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

Try:

RewriteRule ^/ /vegas/index.jsp [QSA]

--
--http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://borrame.com
-- Mi web de humor satinado:http://www.demogracia.com
--

Replies

In response to

Trouble with rewrite rule and passing along the query string posted by laredotornado on Wed, 9 Jun 2010