httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andoni <andonil...@eurokom.ie>
Subject [users@httpd] Re: Rewrite rule not working as I want it to.
Date Tue, 21 Dec 2004 14:25:51 GMT
Hi,

Problem solved.

I was assuming that these were all just strings to Apache and hence I was
trying to replace one with the other as I did not want two question marks in
my resultant query. As it turns out Apache knows what a query string is and
hence this is not a problem as it will construct the query string as a query
string.

  RewriteRule ^/mail$ /release.do?vpn=false [QSA,L]

It will tack onto the end anything that needs to be without duplicating any
question marks.

Andoni.


----- Original Message ----- 
From: "Joshua Slive" <jslive@gmail.com>
Newsgroups: gmane.comp.apache.user
Sent: Tuesday, December 21, 2004 2:05 PM
Subject: Re: Rewrite rule not working as I want it to.


> On Tue, 21 Dec 2004 09:41:20 +0000, Andoni <andonilist@eurokom.ie> wrote:
> >
> > Any and all help appreciated.
> >
> > Can you tell me why this rule does not work:
> >
> >   RewriteRule ^/mail\?file=(.*)$ /release.do?vpn=false&myfile=$1
[QSA,L,NE]
> >
> > Why does this not work when request is:
> >
> > www.xxx.com/mail?file=xxx.txt&com=1
> >
> > I want it to become:
> >
> > www.xxx.com/release.do?vpn=false&myfile=xxx.txt&com=1
> >
> > It does not seem to be doing a straight substitution into $1.
>
> Check the box titled "Query String" here:
> http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewriterule
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message