[thelist] Re: Apache mod_rewrite and PHP SID
Carl J Meyer
cjmeyer at npcc.net
Wed Feb 5 22:31:04 CST 2003
hi Tony,
On Wed, 2003-02-05 at 07:46, Tony Light wrote:
> The problem is that mod_rewrite seems to cause query strings to drop into a
> large black hole.
> I can't pick up the query string with a RewriteRule in the Apache config
> file, and it does not get passed on.
You can access the query string through the Apache environment variable
QUERY_STRING, something like this:
RewriteRule ^/(.*)$ /test.php?foo=$1&%{QUERY_STRING} [L]
AFAIK you cannot directly get at the query string in the rewrite rule
regexp (Rob's suggestion) - though you can do RewriteCond's beforehand
based on the %{REQUEST_URI} which includes the query string.
I think the above line will be your easiest solution.
hth,
Carl
More information about the thelist
mailing list