You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Eric Covener <co...@gmail.com> on 2015/11/24 14:26:14 UTC

Fwd: [users@httpd] RewriteCond to compare file sizes

maybe good for an example in rewrite or ap_expr doc.

---------- Forwarded message ----------
From: mohammad aghanabi <m....@gmail.com>
Date: Tue, Nov 24, 2015 at 3:05 AM
Subject: Re: [users@httpd] RewriteCond to compare file sizes
To: users@httpd.apache.org


Thank you. I then worked with it a little to find how it works:

RewriteCond expr "filesize('%{REQUEST_FILENAME}') -gt 1024"


On Mon, Nov 23, 2015 at 4:43 PM, Yehuda Katz <ye...@ymkatz.net> wrote:
>
> I have never used it, but according to the documentation it is available in 2.4.
> RewriteCond supports expr [1], and expr has a function for filesize [2].
>
> [1] http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewritecond
>
> [2] http://httpd.apache.org/docs/2.4/expr.html#functions
>
> - Y
>
> Sent from a device with a very small keyboard and hyperactive autocorrect.
>
> On Nov 23, 2015 5:56 AM, "mohammad aghanabi" <m....@gmail.com> wrote:
>>
>> Hello
>>
>> 4 years ago a user offered [https://bz.apache.org/bugzilla/show_bug.cgi?id=43845] a modification to mod_rewrite.c which would made it usable to compare file sizes within RewriteCond CondPattern.
>>
>> and someone commented on it "trunk has support for complex expressions in RewriteCond which also offer file size comparison"
>>
>> I want to know what happened to that suggestion, applied or not and if not what that comment is about?
>>
>> Thanks




-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: [users@httpd] RewriteCond to compare file sizes

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 24 Nov 2015 08:26:14 -0500
Eric Covener <co...@gmail.com> wrote:

> maybe good for an example in rewrite or ap_expr doc.

But if so, perhaps with a cautionary note about such
mod_rewrite complexity being obsolete in most cases
and better replaced with <If ...>

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org