Re: Args not being passed in rewrite rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 5, 2008 at 5:58 PM, Tony Stevenson <tony@xxxxxxxxxxx> 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@xxxxxxxxx

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux