httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject ANNOUNCE: mod_rewrite v2.2
Date Wed, 21 Aug 1996 13:07:23 GMT

FYI, mod_rewrite v2.2 has been officially released. Appended
is the official release note.

Remember that this is the long-awaited _RELEASE_ of v2.2 which also should go
to the CVS sourcetree. Please update the Apache sources to this official
release. Thanks.

                                        Ralf S. Engelschall    

                       Ralf S. Engelschall's
                       _                            _ _       
   _ __ ___   ___   __| |    _ __ _____      ___ __(_) |_ ___ 
  | '_ ` _ \ / _ \ / _` |   | '__/ _ \ \ /\ / / '__| | __/ _ \
  | | | | | | (_) | (_| |   | | |  __/\ V  V /| |  | | ||  __/
  |_| |_| |_|\___/ \__,_|___|_|  \___| \_/\_/ |_|  |_|\__\___|

                   The Apache URL Rewriting Module

                      Version 2.2 (22-08-1996)


  This module uses a rule-based rewriting engine (based on a
  regular-expression parser) to rewrite requested URLs on the fly. 
  It supports an unlimited number of additional rule conditions (which can
  operate on a lot of variables, even on HTTP headers) for granular
  matching and even external database lookups (either via plain text
  tables, DBM hash files or even external processes) for advanced URL
  It operates on the full URLs (including the PATH_INFO part) both in
  per-server context (httpd.conf) and per-dir context (.htaccess) and even
  can generate QUERY_STRING parts on result.   The rewriting result finally
  can lead to internal subprocessing, external request redirection or even
  to internal proxy throughput.

  New To Version 2.2

    o   Officially included into the Apache server 1.2

        From v2.2-SNAP as of 13. August 1996 mod_rewrite is officially
        included into the Apache distribution as an optional module, i.e.
        v2.2 finally passed the core members voting and was officially added
        to the CVS tree of Apache. Currently you can grab the Apache snaphots
        named 1.2-dev, where you already can find mod_rewrite.c and
        mod_rewrite.h. Or in other words: The next Apache release 1.2
        contains mod_rewrite v2.2 or higher! 
        BUT NOTICE: 
        1. mod_rewrite will still be developed outside the Apache Group by
           the original author Ralf S. Engelschall, so the Apache
           distribution has not allways contain the latest version of
           mod_rewrite! Its home is still
        2. mod_rewrite_compat.c and mod_rewrite_status.c are still
           not officially included into the Apache distribution. If you want
           to use these optional modules you still have to grab it from the
           authors distribution.

    o   New feature: Rule-Conditions

        This is the major enhancement on v2.2: Now you can precede any
        RewriteRule directive with any number of RewriteCond directives to
        say "Only if the pattern of this rule _AND ALL_ of the preceding
        conditions match, then the substitution of the rule gets used".

        Short examples 1 (put out special page for Netscape users)
          RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
          RewriteRule ^page\.html$       page.NS.html     [L]

        Short example 2 (put out special "sorry"-page for baduser):
          RewriteCond "%{REMOTE_IDENT}@%{REMOTE_HOST} ^$
          RewriteRule ^page\.html$       page.DENIED.html [L]

    o   Final solution for per-dir rewrites via new RewriteBase directive

        The internal redirect on rewriting in per-dir context was wrong.
        There was no way to fix this internally because of the fact that
        there is no string-relation between a URLs prefix and a filesystems
        path prefix. To make per-dir rewriting correct we have introduced a
        new directive "RewriteBase" which sets the URL-prefix of the
        directory it occurs in. When it is left then the filesystem path is
        assumed be the URL prefix, which at most sites is _NOT_ correct.  So,
        it is highly recommended to use this new directive in all .htaccess
        files were URL rewriting gets done!

    o   Speed enhancement: In-core caching
        The external map file lookup for RewriteMap and the
        ${mapfile:key|defaultvalue} construct was speeded up.  Now the looked
        up values get cached in-core until the mapfile's mtime changes. This
        greatly reduces the processing time of the rewriting engine.

    o   New RewriteMap filetype: Program
        A new RewriteMap filetype named "prg" for "program" was added.  This
        lets you write external programs (in any language, but Perl is
        perhaps the best one) which can act like maps.  These programs are
        running parallel to the Apache server processes and communicate on
        stdin (the key) and stdout (the looked up value) with the rewriting
        engine. This can even be used to do any type of complex
        URL-rewriting. Here the key is the old URI (or part of it) and the
        value gets the new URI.

    o   New flag 'passthrough|PT' 
        Because the current Apache API don't supports common URL-to-filename
        translation by more than one module, a new kludge flag was
        introduces: 'passthrough|PT'. This flag has to be used if you want to
        rewrite the requested URL to some other and then finally rewrite this
        via the directives of mod_alias or mod_userdir to the final filename.
        This mixing of mod_alias and mod_rewrite directive is not supported
        by the current API, so you have to use this new flag if you insist in
        mixing the directives.  NOTE: This does not mean, that you cannot
        have RewriteRule and Alias directives in your config. NO, it only
        means, that you cannot have e.g. a RewriteRule directive with a
        result which can be post-processed ba a Alias directive. If you
        really want such a mixed rewriting, then the RewriteRule has to be
        use this new flag.

    o   New Flag 'skip|S=<n>'

        A new flag of the form 'skip|S=<n>' was added to the RewriteRule
        directive.  This can be used to create pseudo if-then-else clauses.

    o   New flag: 'forbidden|F'
        A new flag named 'forbidden|F' was added to the RewriuteRule
        directive. This can be used to block some URLs. With this you can
        even fully emulate the mod_block module.

    o   Argument quoting support added
        Now mod_rewrite supports quoted ("...") arguments for the RewriteRule
        and RewriteCond directives. Use this to include whitespaces if really

    o   DocumentRoot Bugfixes

        A lot of recently occured bugs in context of the document_root
        handling were discovered. These are now fixed and hopefully all which
        were still not known in this context.

    o   Non-standard server support fixed
        Problems with servers running on ports != 80 get fixed. Now the
        http://thishost:thisport prefix is correctly reduced for these
        webservers. And now if those servers do a self-redirect then their
        port gets included into the URL.

    o   QUERY_STRING bugfixed
        A problem with QUERY_STRING parts of URLs was fixed. Now they are
        correctly preserved even over external redirects.

    o   Documentation revised and re-layouted

        The documentation file has been revised, split into smaller peaces
        and re-layouted. Now it is consistent with all recently added
        features and changes.

View raw message