mod_rewrite.h revision 031f1eea4d5ae32771db6664989aecc2729f9511
* Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * ==================================================================== * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. ** _ __ ___ ___ __| | _ __ _____ ___ __(_) |_ ___ ** | '_ ` _ \ / _ \ / _` | | '__/ _ \ \ /\ / / '__| | __/ _ \ ** | | | | | | (_) | (_| | | | | __/\ V V /| | | | || __/ ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** 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. ** This module was originally written in April 1996 and ** gifted exclusively to the The Apache Software Foundation in July 1997 by /* Include from the underlaying Unix system ... */ /* Include from the Apache server ... */ * The key in the r->notes apr_table_t wherein we store our accumulated * Vary values, and the one used for per-condition checks in a chain. * We support only NDBM files. * But we have to stat the file for the mtime, * so we also need to know the file extension ** our private data structures we handle with /* the list structures for holding the mapfile information const char *
name;
/* the name of the map */ const char *
datafile;
/* filename for map data files */ const char *
checkfile;
/* filename to check for map existence */ int type;
/* the type of the map */ char *
input;
/* Input string of RewriteCond */ char *
pattern;
/* the RegExp pattern string */ int flags;
/* Flags which control the match */ char *
pattern;
/* the RegExp pattern string */ char *
output;
/* the Substitution string */ int flags;
/* Flags which control the substitution */ int skip;
/* number of next rules to skip */ /* the per-server or per-virtual-server configuration * statically generated once on startup for every server int state;
/* the RewriteEngine state */ int options;
/* the RewriteOption state */ /* the per-directory configuration * generated on-the-fly by Apache server for current request int state;
/* the RewriteEngine state */ int options;
/* the RewriteOption state */ char *
directory;
/* the directory where it applies */ const char *
baseurl;
/* the base-URL where it applies */ * a 4-way hash apr_table_t with LRU functionality /* the regex structure for the * substitution of backreferences /* config structure handling */ /* config directive handling */ const char *
a1,
const char *
a2);
/* URI transformation function */ /* rewrite map support functions */ /* rewriting logfile support */ /* rewriting lockfile support */ /* program map support */ /* env variable support */ /* Lexicographic Comparison */ /* Bracketed expression handling */ #
endif /* MOD_REWRITE_H */