You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Zembower, Kevin" <kz...@jhuccp.org> on 2006/06/16 18:06:53 UTC

[users@httpd] Getting a literal question mark in substitution string of mod_rewrite?

I suspect that this must be a FAQ, but I searched for an hour in Google,
and this list's archives, but didn't find an answer. Please point it out
to me if I missed it.

I want to put a literal '?' in the substitution string of a mod_rewrite
rule. Here's what I have so far:

   RewriteRule ^/docs/([0-9]{6})$
http://db.jhuccp.org/ics-wpd/exec/icswppro.dll%3FBU=http://db.jhuccp.org
/ics-wpd/exec/icswppro.dll?&QF0=DocNo&QI0=$1&TN=Popline&AC=QBE_QUERY&MR=
30\%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay          [P]

This rule says take the 6 digit string after '/docs/' and put it in the
middle of this complicated string for a database called InMagic.
However, there has to be a question mark after 'icswppro.dll' and before
'&QF0=...'. I know that the question mark is normally used in
mod_rewrite to indicate substitution of the entire query string. I've
tried escaping it with '\?' and writing it as '%3F' or '\%3F' without
success.

Is it possible to do this, or do I have to manipulate it in the query
string and substitute that back in?

Thanks for all your help, suggestions and advice.

-Kevin

Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland  21202
410-659-6139 

---------------------------------------------------------------------
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