mod_rewrite.h revision 904d7bf799c6216beb34519463596b4fce630308
253N/A/* ==================================================================== 253N/A * The Apache Software License, Version 1.1 253N/A * Copyright (c) 2000-2001 The Apache Software Foundation. All rights 253N/A * Redistribution and use in source and binary forms, with or without 253N/A * modification, are permitted provided that the following conditions 253N/A * 1. Redistributions of source code must retain the above copyright 253N/A * notice, this list of conditions and the following disclaimer. 253N/A * 2. Redistributions in binary form must reproduce the above copyright 253N/A * notice, this list of conditions and the following disclaimer in 253N/A * the documentation and/or other materials provided with the 253N/A * 3. The end-user documentation included with the redistribution, 253N/A * if any, must include the following acknowledgment: 5680N/A * "This product includes software developed by the 5680N/A * Alternately, this acknowledgment may appear in the software itself, 5680N/A * if and wherever such third-party acknowledgments normally appear. 5680N/A * 4. The names "Apache" and "Apache Software Foundation" must 253N/A * not be used to endorse or promote products derived from this 253N/A * software without prior written permission. For written 5680N/A * permission, please contact apache@apache.org. 253N/A * 5. Products derived from this software may not be called "Apache", 1233N/A * nor may "Apache" appear in their name, without prior written 253N/A * permission of the Apache Software Foundation. 1233N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1233N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1258N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 253N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 3966N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3966N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5680N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 5680N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 253N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 253N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 253N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 253N/A * ==================================================================== 253N/A * This software consists of voluntary contributions made by many 5680N/A * individuals on behalf of the Apache Software Foundation. For more 253N/A * information on the Apache Software Foundation, please see 253N/A * Portions of this software are based upon public domain software 253N/A * originally written at the National Center for Supercomputing Applications, 253N/A * University of Illinois, Urbana-Champaign. 5680N/A** _ __ ___ ___ __| | _ __ _____ ___ __(_) |_ ___ 5680N/A** | '_ ` _ \ / _ \ / _` | | '__/ _ \ \ /\ / / '__| | __/ _ \ 5680N/A** | | | | | | (_) | (_| | | | | __/\ V V /| | | | || __/ 253N/A** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| 5680N/A** This module uses a rule-based rewriting engine (based on a 253N/A** regular-expression parser) to rewrite requested URLs on the fly. 253N/A** It supports an unlimited number of additional rule conditions (which can 253N/A** operate on a lot of variables, even on HTTP headers) for granular 253N/A** matching and even external database lookups (either via plain text 253N/A** tables, DBM hash files or even external processes) for advanced URL 253N/A** It operates on the full URLs (including the PATH_INFO part) both in 253N/A** per-server context (httpd.conf) and per-dir context (.htaccess) and even 253N/A** can generate QUERY_STRING parts on result. The rewriting result finally 253N/A** can lead to internal subprocessing, external request redirection or even 253N/A** to internal proxy throughput. 253N/A** This module was originally written in April 1996 and 253N/A** gifted exclusively to the The Apache Software Foundation in July 1997 by 5680N/A /* 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 */