httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] RewriteRule
Date Thu, 01 Feb 2007 00:45:01 GMT
On 1/31/07, Javier Martínez Fernández <ecentinela@gmail.com> wrote:
> Thanks, but I can't understand this. I'm a newbie on apache config.
> Some more help, please?
>
>
> El 31/01/2007, a las 21:04, Joshua Slive escribió:
>
> > On 1/31/07, Javier Martínez Fernández <ecentinela@gmail.com> wrote:
> >> I'm making a rewrite rule and I'm having problems with the "?"
> >> character
> >
> > Read the box labeled "Note: Query String" under
> > http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule

The query string is the part of URL following the ?.  It is not
matched by a standard RewriteRule.  In your case, you'll need
something like
RewriteCond %{QUERY_STRING} blahblah

In the blahblah, you match against, the part after the ?.  Then in the
following RewriteRule, you can use back-references (%1, %2, etc) to
grab the matches.  I'd give a crack at showing you how your case
should work, but I find your example too complex and confusing.  You
appear to be embedding a second query string inside the query string,
which isn't going to work (the second question mark will need to be
escaped).

Some general advice:
- Google a little for "RewriteCond QUERY_STRING" and you'll find lots
of examples.
- Use the RewriteLog to see what is going on.  This would have showed
you quickly that you weren't matching against the query string.

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


Mime
View raw message