httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Holthaus - Orange XL" <>
Subject [users@httpd] Rewrite-problem
Date Sun, 09 Feb 2003 23:39:12 GMT
I have a real simple problem, but for some reason, I'm not able to solve it.

I want to write out a cookie on the basis of a query string:

which should via the rewrite-engine be transformed to:

Looks straighforward. I came up with something like this (tried many many
varitions, this is just one)

RewriteEngine on
    # Turn on Rewrite engine

RewriteCond %{QUERY_STRING} !^$
    #  Select a request which contains a ?

RewriteRule ^([^?]*)\?(.*)$$1
    # put eveything without/until a ? in $1, put everything after a/the
first ? in $2
    # $1 will be the redirect-uri
    # $2 will be written as a cookie

The problem seems to the \? in the regex of the rewriterule. The regex will
not match addresses with a ? in them.

Can anyone help me out here? Thanx!

Kind regards,
Sander Holthaus

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message