index.html.en revision 1093a264c81aa1041581ab059905fb8f7cdfc5e2
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<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>
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<div class="up"><a href="../"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
4b5981e276e93df97c34e4da05ca5cf8bbd937dand<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache mod_rewrite</h1>
f3ec420152ca921e4c1ce77782f51b53f659018dnd<p><span>Available Languages: </span><a href="/en/rewrite/" title="English"> en </a> |
bd2feb86ee6d8c91ecd992138ceb96a7069a5578gryzor<a href="/fr/rewrite/" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/tr/rewrite/" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
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>
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"><VirtualHost></a></code> blocks), or
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen per-directory context (<code>.htaccess</code> files and <code class="directive"><a href="/mod/core.html#directory"><Directory></a></code> blocks). The
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen rewritten result can lead to further rules, internal
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen sub-processing, external request redirection, or proxy
0b1f1f5b70f1d4df3b6a6eb4c92f6869719dc711rbowen passthrough.</p>
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>
f3f7fbd152943fb15146b438ec8a4c39c404a2fbrbowen<li><a href="/mod/mod_rewrite.html">mod_rewrite reference
1093a264c81aa1041581ab059905fb8f7cdfc5e2rbowen<li><a href="intro.html">Introduction to regular expressions and
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
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>
f3ec420152ca921e4c1ce77782f51b53f659018dnd<p><span>Available Languages: </span><a href="/en/rewrite/" title="English"> en </a> |
bd2feb86ee6d8c91ecd992138ceb96a7069a5578gryzor<a href="/fr/rewrite/" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/tr/rewrite/" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
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>