You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hayward Lam <ha...@gmail.com> on 2008/05/13 16:59:17 UTC

[users@httpd] Rewrite Problem

I need to support the ARK (Archive Resource Key) spec which requires URL
ending with "?" and "??". For example:

http://domain.com/ark:/12345/t41290?
http://domain.com/ark:/12345/t41290??

Since "?" is used for request parameter, when it is ending with "?" by
itself, my Apache Tomcat ignores it.

I am thinking about using Apache Http's mod_rewrite to map "?" and "??" to
request parameters. However, rewrite rules don't see query string.

Is there a way to achieve this? Any help would be greatly appreciated.

Hayward

Re: [users@httpd] Rewrite Problem

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, May 13, 2008 at 10:59 AM, Hayward Lam <ha...@gmail.com> wrote:
> I need to support the ARK (Archive Resource Key) spec which requires URL
> ending with "?" and "??". For example:
>
> http://domain.com/ark:/12345/t41290?
>  http://domain.com/ark:/12345/t41290??
>
> Since "?" is used for request parameter, when it is ending with "?" by
> itself, my Apache Tomcat ignores it.
>
> I am thinking about using Apache Http's mod_rewrite to map "?" and "??" to
> request parameters. However, rewrite rules don't see query string.
>
> Is there a way to achieve this? Any help would be greatly appreciated.

That's a pretty lame spec if it requires an unencoded ? to mean
something other than the start of a query string.

Anyway, you can examine the raw request in mod_rewrite by using a
RewriteCond against the variable %{THE_REQUEST}. That should allow you
to match against and substitute the question mark.

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