mod_alias.html.en revision 2348633f2de9e8a3228db792f189d8b6ffdfdafa
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0" encoding="ISO-8859-1"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
e942c741056732f50da2074b36fe59805d370650slive<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This file is generated from xml source: DO NOT EDIT
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive -->
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<title>mod_alias - Apache HTTP Server</title>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<link href="/images/favicon.ico" rel="shortcut icon" /></head>
003f0c9fda6664daf5092a0e42f65ede20098153slive<body>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="page-header">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p class="apache">Apache HTTP Server Version 2.1</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<img alt="" src="/images/feather.gif" /></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div id="path">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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-project/">Documentation</a> &gt; <a href="../">Version 2.1</a> &gt; <a href="./">Modules</a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="page-content">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="preamble"><h1>Apache Module mod_alias</h1>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides for mapping different parts of the host
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem in the document tree and for URL redirection</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>alias_module</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_alias.c</td></tr></table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>Summary</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The directives contained in this module allow for manipulation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and control of URLs as requests arrive at the server. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#alias">Alias</a></code> and <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> directives are used to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive map between URLs and filesystem paths. This allows for content
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which is not directly under the <code class="directive"><a href="/mod/core.html#documentroot">DocumentRoot</a></code> served as part of the web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document tree. The <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> directive has the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive additional effect of marking the target directory as containing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only CGI scripts.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive"><a href="#redirect">Redirect</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives are used to instruct clients to make a new request with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a different URL. They are often used when a resource has moved to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a new location.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="quickview"><h3 class="directives">Directives</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul id="toc">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#alias">Alias</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#aliasmatch">AliasMatch</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#redirect">Redirect</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#redirectmatch">RedirectMatch</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#redirectpermanent">RedirectPermanent</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#redirecttemp">RedirectTemp</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#scriptalias">ScriptAlias</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#scriptaliasmatch">ScriptAliasMatch</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<h3>See also</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<ul class="seealso">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/urlmapping.html">Mapping URLs to the filesystem</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</ul></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="Alias" id="Alias">Alias</a> <a name="alias" id="alias">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps URLs to filesystem locations</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Alias <var>URL-path</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>file-path</var>|<var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">Alias</code> directive allows documents to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be stored in the local filesystem other than under the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/core.html#documentroot">DocumentRoot</a></code>. URLs with a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (%-decoded) path beginning with <var>url-path</var> will be mapped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to local files beginning with <var>directory-path</var>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example:</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Alias /image /ftp/pub/image
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>A request for http://myserver/image/foo.gif would cause the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server to return the file /ftp/pub/image/foo.gif.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that if you include a trailing / on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>url-path</var> then the server will require a trailing / in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order to expand the alias. That is, if you use <code>Alias
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /icons/ /usr/local/apache/icons/</code> then the url
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>/icons</code> will not be aliased.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Note that you may need to specify additional <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code> sections which
003f0c9fda6664daf5092a0e42f65ede20098153slive cover the <em>destination</em> of aliases. Aliasing occurs before
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code> sections
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are checked, so only the destination of aliases are affected.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Note however <code class="directive"><a href="/mod/core.html#location">&lt;Location&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections are run through once before aliases are performed, so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive they will apply.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In particular, if you are creating an <code>Alias</code> to a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory outside of your <code class="directive"><a href="/mod/code.html#documentroot">DocumentRoot</a></code>, you may need to explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permit access to the target directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example:</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Alias /image /ftp/pub/image<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /ftp/pub/image&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <span class="indent">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order allow,deny<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </span>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="AliasMatch" id="AliasMatch">AliasMatch</a> <a name="aliasmatch" id="aliasmatch">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps URLs to filesystem locations using regular
530eba85dbd41b8a0fa5255d3648d1440199a661sliveexpressions</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AliasMatch <var>regex</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>file-path</var>|<var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is equivalent to <code class="directive"><a href="#alias">Alias</a></code>, but makes use of standard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regular expressions, instead of simple prefix matching. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive supplied regular expression is matched against the URL-path, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if it matches, the server will substitute any parenthesized
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matches into the given string and use it as a filename. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, to activate the <code>/icons</code> directory, one might
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AliasMatch ^/icons(.*) /usr/local/apache/icons$1
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="Redirect" id="Redirect">Redirect</a> <a name="redirect" id="redirect">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sends an external redirect asking the client to fetch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea different URL</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Redirect [<var>status</var>] <var>URL-path</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>URL</var></code></td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The Redirect directive maps an old URL into a new one. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive new URL is returned to the client which attempts to fetch it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive again with the new address. <var>URL-path</var> a (%-decoded)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path; any requests for documents beginning with this path will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be returned a redirect error to a new (%-encoded) URL beginning
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with <var>URL</var>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example:</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Redirect /service http://foo2.bar.com/service
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If the client requests http://myserver/service/foo.txt, it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be told to access http://foo2.bar.com/service/foo.txt
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive instead.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="note"><h3>Note</h3> <p>Redirect directives take precedence over
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAlias and ScriptAlias directives, irrespective of their ordering in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe configuration file. Also, <var>URL-path</var> must be an absolute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepath, not a relative path, even when used with .htaccess files or
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveinside of <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesections.</p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If no <var>status</var> argument is given, the redirect will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be "temporary" (HTTP status 302). This indicates to the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the resource has moved temporarily. The <var>status</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive argument can be used to return other HTTP status codes:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>permanent</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a permanent redirect status (301) indicating that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource has moved permanently.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>temp</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a temporary redirect status (302). This is the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>seeother</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a "See Other" status (303) indicating that the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource has been replaced.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>gone</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a "Gone" status (410) indicating that the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource has been permanently removed. When this status is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used the <var>URL</var> argument should be omitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Other status codes can be returned by giving the numeric
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status code as the value of <var>status</var>. If the status is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive between 300 and 399, the <var>URL</var> argument must be present,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive otherwise it must be omitted. Note that the status must be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive known to the Apache code (see the function
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>send_error_response</code> in http_protocol.c).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example:</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Redirect permanent /one http://example.com/two<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Redirect 303 /three http://example.com/other
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RedirectMatch" id="RedirectMatch">RedirectMatch</a> <a name="redirectmatch" id="redirectmatch">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sends an external redirect based on a regular expression match
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveof the current URL</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RedirectMatch [<var>status</var>] <var>regex</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>URL</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is equivalent to <code class="directive"><a href="#redirect">Redirect</a></code>, but makes use of standard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regular expressions, instead of simple prefix matching. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive supplied regular expression is matched against the URL-path, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if it matches, the server will substitute any parenthesized
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matches into the given string and use it as a filename. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, to redirect all GIF files to like-named JPEG files on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive another server, one might use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RedirectPermanent" id="RedirectPermanent">RedirectPermanent</a> <a name="redirectpermanent" id="redirectpermanent">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sends an external permanent redirect asking the client to fetch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea different URL</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RedirectPermanent <var>URL-path</var> <var>URL</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive makes the client know that the Redirect is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permanent (status 301). Exactly equivalent to <code>Redirect
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permanent</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RedirectTemp" id="RedirectTemp">RedirectTemp</a> <a name="redirecttemp" id="redirecttemp">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sends an external temporary redirect asking the client to fetch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea different URL</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RedirectTemp <var>URL-path</var> <var>URL</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive makes the client know that the Redirect is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only temporary (status 302). Exactly equivalent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Redirect temp</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ScriptAlias" id="ScriptAlias">ScriptAlias</a> <a name="scriptalias" id="scriptalias">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<table class="directive">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps a URL to a filesystem location and designates the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivetarget as a CGI script</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptAlias <var>URL-path</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>file-path</var>|<var>directory-path</var></code></td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</table>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>The <code class="directive">ScriptAlias</code> directive has the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive behavior as the <code class="directive"><a href="#alias">Alias</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, except that in addition it marks the target directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as containing CGI scripts that will be processed by <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (%-decoded) path beginning with <var>URL-path</var> will be mapped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to scripts beginning with the second argument which is a full
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname in the local filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><h3>Example:</h3><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ScriptAlias /cgi-bin/ /web/cgi-bin/
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server to run the script <code>/web/cgi-bin/foo</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ScriptAliasMatch" id="ScriptAliasMatch">ScriptAliasMatch</a> <a name="scriptaliasmatch" id="scriptaliasmatch">Directive</a></h2>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<table class="directive">
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps a URL to a filesystem location using a regular expression
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesand designates the target as a CGI script</td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptAliasMatch <var>regex</var>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<var>file-path</var>|<var>directory-path</var></code></td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</table>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p>This directive is equivalent to <code class="directive"><a href="#scriptalias">ScriptAlias</a></code>, but makes use of standard
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes regular expressions, instead of simple prefix matching. The
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes supplied regular expression is matched against the URL-path,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes and if it matches, the server will substitute any parenthesized
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes matches into the given string and use it as a filename. For
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes example, to activate the standard <code>/cgi-bin</code>, one
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes might use:</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <div class="example"><p><code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div id="footer">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</body></html>