httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Covener" <cove...@gmail.com>
Subject Re: [users@httpd] Args not being passed in rewrite rule
Date Tue, 05 Aug 2008 22:33:29 GMT
On Tue, Aug 5, 2008 at 5:58 PM, Tony Stevenson <tony@pc-tony.com> wrote:
> Skip Evans wrote:
>>
>> Hey all,
>>
>> I have the following rewrite rule in an .htaccess file.
>>
>> RewriteRule .modules.php?(.*)$
>> http://prepcube.venomouspenguin.com/modules.php?$1

The query string (arguments) aren't part of what you're matching in
the first parameter, so you can't match and capture them like that.

Your regex actually matches modules.ph with an option 'p' at the end,
not modules.php with a query string.

The query string can be matched by using RewriteCond %{QUERY_STRING},
or it would have been passed along by default if you hadn't added a
"?" at the end of your substitution

I believe Tony's answer is a slightly different FAQ for when you're
adding some new piece of a query string and not trying to
capture/propogate the query string yourself.

-- 
Eric Covener
covener@gmail.com

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