mod_rewrite.h revision 895b674fa4e5a4c8fcbcb4e7b30630857653c149
2N/A/* ==================================================================== 2N/A * Copyright (c) 1996-1999 The Apache Group. All rights reserved. 2N/A * Redistribution and use in source and binary forms, with or without 2N/A * modification, are permitted provided that the following conditions 2N/A * 1. Redistributions of source code must retain the above copyright 2N/A * notice, this list of conditions and the following disclaimer. 2N/A * 2. Redistributions in binary form must reproduce the above copyright 2N/A * notice, this list of conditions and the following disclaimer in 2N/A * the documentation and/or other materials provided with the 2N/A * 3. All advertising materials mentioning features or use of this 2N/A * software must display the following acknowledgment: 2N/A * "This product includes software developed by the Apache Group 58N/A * 4. The names "Apache Server" and "Apache Group" must not be used to 2N/A * endorse or promote products derived from this software without 2N/A * prior written permission. For written permission, please contact 32N/A * apache@apache.org. 2N/A * 5. Products derived from this software may not be called "Apache" 2N/A * nor may "Apache" appear in their names without prior written 26N/A * permission of the Apache Group. 38N/A * 6. Redistributions of any form whatsoever must retain the following 29N/A * "This product includes software developed by the Apache Group 29N/A * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY 26N/A * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29N/A * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR 26N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 38N/A * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 2N/A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6N/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 2N/A * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 58N/A * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 2N/A * OF THE POSSIBILITY OF SUCH DAMAGE. 2N/A * ==================================================================== 34N/A * This software consists of voluntary contributions made by many 34N/A * individuals on behalf of the Apache Group and was originally based 34N/A * on public domain software written at the National Center for 49N/A * Supercomputing Applications, University of Illinois, Urbana-Champaign. 70N/A * For more information on the Apache Group and the Apache HTTP server 85N/A** _ __ ___ ___ __| | _ __ _____ ___ __(_) |_ ___ 61N/A** | '_ ` _ \ / _ \ / _` | | '__/ _ \ \ /\ / / '__| | __/ _ \ 61N/A** | | | | | | (_) | (_| | | | | __/\ V V /| | | | || __/ 61N/A** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| 61N/A** URL Rewriting Module 61N/A** This module uses a rule-based rewriting engine (based on a 61N/A** regular-expression parser) to rewrite requested URLs on the fly. 61N/A** It supports an unlimited number of additional rule conditions (which can 85N/A** operate on a lot of variables, even on HTTP headers) for granular 61N/A** matching and even external database lookups (either via plain text 61N/A** tables, DBM hash files or even external processes) for advanced URL 61N/A** It operates on the full URLs (including the PATH_INFO part) both in 61N/A** per-server context (httpd.conf) and per-dir context (.htaccess) and even 61N/A** can generate QUERY_STRING parts on result. The rewriting result finally 61N/A** can lead to internal subprocessing, external request redirection or even 61N/A** to internal proxy throughput. 43N/A** This module was originally written in April 1996 and 43N/A** gifted exclusively to the The Apache Group in July 1997 by 64N/A** Ralf S. Engelschall 64N/A** rse@engelschall.com 64N/A /* Include from the underlaying Unix system ... */ 16N/A /* Include from the Apache server ... */ 12N/A * The key in the r->notes ap_table_t wherein we store our accumulated 12N/A * Vary values, and the one used for per-condition checks in a chain. 12N/A /* The NDBM support: 61N/A * We support only NDBM files. 61N/A * But we have to stat the file for the mtime, 61N/A * so we also need to know the file extension 2N/A /* The locking support: 40N/A * Try to determine whether we should use fcntl() or flock(). 61N/A** our private data structures we handle with 61N/A /* the list structures for holding the mapfile information 61N/A * and the rewrite rules 62N/A char *
input;
/* Input string of RewriteCond */ 62N/A 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 */ char *
baseurl;
/* the base-URL where it applies */ * a 4-way hash ap_table_t with LRU functionality /* the regex structure for the * substitution of backreferences /* config structure handling */ /* config directive handling */ /* URI transformation function */ /* rewrite map support functions */ /* rewriting logfile support */ /* rewriting lockfile support */ /* program map support */ /* env variable support */ /* Lexicographic Comparison */ #
endif /* _MOD_REWRITE_H */