index.html.en revision 1093a264c81aa1041581ab059905fb8f7cdfc5e2
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<?xml version="1.0" encoding="ISO-8859-1"?>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
22a41ae508535e87c3c2270202ae78de6ac4672crbowen XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
22a41ae508535e87c3c2270202ae78de6ac4672crbowen This file is generated from xml source: DO NOT EDIT
22a41ae508535e87c3c2270202ae78de6ac4672crbowen XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
22a41ae508535e87c3c2270202ae78de6ac4672crbowen -->
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<title>Apache mod_rewrite - Apache HTTP Server</title>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<link href="/images/favicon.ico" rel="shortcut icon" /></head>
4eb5e97c7a147352e1017b0114d2719d5f67cea9rbowen<body id="manual-page"><div id="page-header">
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz<p class="apache">Apache HTTP Server Version 2.3</p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<img alt="" src="/images/feather.gif" /></div>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<div id="path">
4b5981e276e93df97c34e4da05ca5cf8bbd937dand<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache mod_rewrite</h1>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<div class="toplang">
f3ec420152ca921e4c1ce77782f51b53f659018dnd<p><span>Available Languages: </span><a href="/en/rewrite/" title="English">&nbsp;en&nbsp;</a> |
bd2feb86ee6d8c91ecd992138ceb96a7069a5578gryzor<a href="/fr/rewrite/" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/tr/rewrite/" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen</div>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen
22a41ae508535e87c3c2270202ae78de6ac4672crbowen
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen <p>mod_rewrite uses a rule-based rewriting engine (based on a
22a41ae508535e87c3c2270202ae78de6ac4672crbowen regular-expression parser) to rewrite requested URLs on the
22a41ae508535e87c3c2270202ae78de6ac4672crbowen fly. It supports an unlimited number of rules and an
22a41ae508535e87c3c2270202ae78de6ac4672crbowen unlimited number of attached rule conditions for each rule to
22a41ae508535e87c3c2270202ae78de6ac4672crbowen provide a really flexible and powerful URL manipulation
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen mechanism. The URL manipulations can depend on various tests:
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen server variables, environment variables, HTTP
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen headers, time stamps external database lookups, and various other
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen external processes or handlers, can be used to achieve granular URL
22a41ae508535e87c3c2270202ae78de6ac4672crbowen matching.</p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen <p>Rewrite rules can operate on the full URLs, including the path-info
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen and query string portions, and may be used in per-server context
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen (<code>httpd.conf</code>), per-virtualhost context (<code class="directive"><a href="/mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> blocks), or
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen per-directory context (<code>.htaccess</code> files and <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code> blocks). The
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen rewritten result can lead to further rules, internal
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen sub-processing, external request redirection, or proxy
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen passthrough.</p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen <p>Since mod_rewrite is so powerful, it can indeed be rather
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen complex. This document supplements the <a href="/mod/mod_rewrite.html">reference documentation</a>, and
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen attempts to allay some of that complexity, and provide highly
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen annoted examples of common scenarios that you may handle with
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen mod_rewrite. But we also attempt to show you when you should not
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen use mod_rewrite, and use other standard Apache features instead,
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen thus avoiding this unnecessary complexity.</p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<ul>
f3f7fbd152943fb15146b438ec8a4c39c404a2fbrbowen<li><a href="/mod/mod_rewrite.html">mod_rewrite reference
f3f7fbd152943fb15146b438ec8a4c39c404a2fbrbowendocumentation</a></li>
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen<li><a href="intro.html">Introduction to regular expressions and
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowenmod_rewrite</a></li>
f5cfdad942d8d69e7991d58f0910688e7821ed9cslive<li><a href="rewrite_flags.html">Flags</a></li>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<li><a href="rewrite_tech.html">Technical details</a></li>
ec7f95732d562ee4f5586faea04d12df7fb20180rbowen<li><a href="rewrite_guide.html">Rewrite Guide - useful examples</a></li>
ec7f95732d562ee4f5586faea04d12df7fb20180rbowen<li><a href="rewrite_guide_advanced.html">Advanced Rewrite Guide - more
ec7f95732d562ee4f5586faea04d12df7fb20180rbowenuseful examples</a></li>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen</ul>
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen</div>
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen<div id="quickview"><h3>See also</h3><ul class="seealso"><li><a href="/mod/mod_rewrite.html">mod_rewrite reference
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowendocumentation</a></li><li><a href="/urlmapping.html">Mapping URLs to the Filesystem</a></li><li><a href="http://wiki.apache.org/httpd/Rewrite">mod_rewrite
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowenwiki</a></li><li><a href="/glossary.html">Glossary</a></li></ul></div>
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen</div>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<div class="bottomlang">
f3ec420152ca921e4c1ce77782f51b53f659018dnd<p><span>Available Languages: </span><a href="/en/rewrite/" title="English">&nbsp;en&nbsp;</a> |
bd2feb86ee6d8c91ecd992138ceb96a7069a5578gryzor<a href="/fr/rewrite/" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/tr/rewrite/" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen</div><div id="footer">
b036ef2952fb6924b308f954b39786443460ddc6rpluem<p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
22a41ae508535e87c3c2270202ae78de6ac4672crbowen</body></html>