httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Re: [PATCH] more backref interpolation for rewriting engine
Date Fri, 01 Aug 1997 09:06:55 GMT

In article <Pine.LNX.3.95dg3.970731211903.3340c-100000@twinlark.arctic.org> you wrote:

> +1, but only if you change the name of mod_rewrite to mod_sendmail_cf. 
> just kidding. 

<grins> Yes, as everyone knows: Beside Larry Wall the guy named Eric Allman is
my favorite hacker... And not just kidding: The header rewriting engine in
Sendmail actually inspired mod_rewrites URL rewriting engine although I hated
the ugly syntax of Sendmail rules. (I hope mod_rewrite's rules are a little
bit better.. Hmmm..)

> It is confusing for $N to back reference the url-pattern which appears
> *AFTER* all the conditions.  But other than that, sure why not. 

Yes, but this is the way since the early days. This has not changed.  It is a
little bit ugly in syntax when writing down the ruleset, but is _really
essential_ for the rewriting engine to be performant. Because a rule can have
as many conditions it likes and it would be horrible if the engine would first
test all those conditions (regex compares!) and then match the pattern of the
RewriteRule and just discover that the rule does not match. So, its a little
bit confusing when reading rulesets but it is the best way we can program a
rewriting engine so it has less overhead.

> mod_rewrite programs are about as confusing as perl programs ;) 

<grins> Sure. mod_rewrite is such powerful because it has the same spirit
built-in as Perl: Maximum flexibility. Or in other words (to adapt a statement
from Perl for mod_rewrite):

   "mod_rewrite makes easy URL manipulations easy, 
    and hard ones possible."

Shouldn't we add this slogan to mod_rewrite.html?

Another interesting point: Apache with mod_rewrite exists since Summer 1996
and is _STILL_ the only webserver which provides such a flexible engine for
URL manipulations. So Apache is the only webserver which really can solve hard
URL manipulation problems. Of course the same applies to other nice things of
Apache. But I love to think about these facts and I love to know that we beat
all the others. The mod_rewrite user reponses over the last year showed that
although mod_rewrite is complicated the real webmaster needs such a
functionality.

Greetings,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message