mod_alias.xml revision d24d4c5159bcb11c25bb294926cfe7105c789ea9
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<modulesynopsis>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<name>mod_alias</name>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<description>Provides for mapping different parts of the host
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding filesystem in the document tree and for URL redirection</description>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<status>Base</status>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<sourcefile>mod_alias.c</sourcefile>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<identifier>alias_module</identifier>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<summary>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <p>The directives contained in this module allow for manipulation
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd and control of URLs as requests arrive at the server. The
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <directive module="mod_alias">Alias</directive> and <directive
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd module="mod_alias">ScriptAlias</directive> directives are used to
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd map between URLs and filesystem paths. This allows for content
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd which is not directly under the <directive
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd module="core">DocumentRoot</directive> served as part of the web
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd document tree. The <directive
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd module="mod_alias">ScriptAlias</directive> directive has the
7db9f691a00ead175b03335457ca296a33ddf31bnd additional effect of marking the target directory as containing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only CGI scripts.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive module="mod_alias">Redirect</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives are used to instruct clients to make a new request with
530eba85dbd41b8a0fa5255d3648d1440199a661slive a different URL. They are often used when a resource has moved to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a new location.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>A more powerful and flexible set of directives for
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna manipulating URLs is contained in the <module>mod_rewrite</module>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna module.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</summary>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>Alias</name>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Maps URLs to filesystem locations</description>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<syntax> Alias <em>URL-path
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic file-path</em>|<em>directory-path</em></syntax>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<contextlist><context>server config</context><context>virtual host</context>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic</contextlist>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<usage>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>The <directive>Alias</directive> directive allows documents to
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe be stored in the local filesystem other than under the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive module="core">DocumentRoot</directive>. URLs with a
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe (%-decoded) path beginning with <em>url-path</em> will be mapped
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe to local files beginning with <em>directory-filename</em>.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Example:</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<example>Alias /image /ftp/pub/image</example>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <p>A request for http://myserver/image/foo.gif would cause the
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier server to return the file /ftp/pub/image/foo.gif.</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Note that if you include a trailing / on the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <em>url-path</em> then the server will require a trailing / in
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna order to expand the alias. That is, if you use <code>Alias
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna /icons/ /usr/local/apache/icons/</code> then the url
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/icons</code> will not be aliased.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Note that you may need to specify additional <directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor module="core">&lt;Directory&gt;</directive> sections which cover
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the <em>destination</em> of aliases. Aliasing occurs before
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <directive module="core">&lt;Directory&gt;</directive> sections
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor are checked, so only the destination of aliases are affected.
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna (Note however <directive module="core">&lt;Location&gt;</directive>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna sections are run through once before aliases are performed, so
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna they will apply.)</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>AliasMatch</name>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Maps URLs to filesystem locations using regular
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorexpressions</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<syntax>AliasMatch <em>regex
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor file-path</em>|<em>directory-path</em></syntax>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<contextlist><context>server config</context><context>virtual host</context>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</contextlist>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<usage>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>This directive is equivalent to <directive
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe module="mod_alias">Alias</directive>, but makes use of standard
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe regular expressions, instead of simple prefix matching. The
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe supplied regular expression is matched against the URL-path, and
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe if it matches, the server will substitute any parenthesized
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe matches into the given string and use it as a filename. For
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe example, to activate the <code>/icons</code> directory, one might
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe use:</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe AliasMatch ^/icons(.*) /usr/local/apache/icons$1
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</usage>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</directivesynopsis>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<directivesynopsis>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<name>Redirect</name>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<description>Sends an external redirect asking the client to fetch
5ae609a8a09239d20f48a4a95c4f21b713995babwrowea different URL</description>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<syntax>Redirect [<em>status</em>] <em>URL-path URL</em></syntax>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<contextlist><context>server config</context><context>virtual host</context>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<context>directory</context><context>.htaccess</context></contextlist>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<override>FileInfo</override>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The Redirect directive maps an old URL into a new one. The
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna new URL is returned to the client which attempts to fetch it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive again with the new address. <em>URL-path</em> a (%-decoded)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path; any requests for documents beginning with this path will
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess be returned a redirect error to a new (%-encoded) URL beginning
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with <em>URL</em>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<example>Redirect /service http://foo2.bar.com/service</example>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <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<note><title>Note</title> <p>Redirect directives take precedence over
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAlias and ScriptAlias directives, irrespective of their ordering in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe configuration file. Also, <em>URL-path</em> must be an absolute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepath, not a relative path, even when used with .htaccess files or
fb77c505254b6e9c925e23e734463e87574f8f40kessinside of <directive module="core">&lt;Directory&gt;</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kesssections.</p></note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If no <em>status</em> 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 <em>status</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive argument can be used to return other HTTP status codes:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>permanent</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a permanent redirect status (301) indicating that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource has moved permanently.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>temp</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a temporary redirect status (302). This is the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt>seeother</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a "See Other" status (303) indicating that the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource has been replaced.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt>gone</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Returns a "Gone" status (410) indicating that the
fb77c505254b6e9c925e23e734463e87574f8f40kess resource has been permanently removed. When this status is
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess used the <em>url</em> argument should be omitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Other status codes can be returned by giving the numeric
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status code as the value of <em>status</em>. If the status is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive between 300 and 399, the <em>url</em> 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
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>send_error_response</code> in http_protocol.c).</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>RedirectMatch</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Sends an external redirect asking the client to fetch
130d299c4b2b15be45532a176604c71fdc7bea5bnda different URL based on a regular expression match of the
130d299c4b2b15be45532a176604c71fdc7bea5bndcurrent URL</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>RedirectMatch [<em>status</em>] <em>regex URL</em></syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<context>directory</context><context>.htaccess</context></contextlist>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<override>FileInfo</override>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive is equivalent to <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_alias">Redirect</directive>, 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
003f0c9fda6664daf5092a0e42f65ede20098153slive another server, one might use:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>RedirectTemp</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Sends an external temporary redirect asking the client to fetch
6b64034fa2a644ba291c484c0c01c7df5b8d982ckessa different URL</description>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<syntax>RedirectTemp <em>URL-path URL</em></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
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</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>RedirectPermanent</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Sends an external permanent redirect asking the client to fetch
130d299c4b2b15be45532a176604c71fdc7bea5bnda different URL</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>RedirectPermanent <em>URL-path URL</em></syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen <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</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ScriptAlias</name>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<description>Maps a URL to a filesystem location and designates the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivetarget as a CGI script</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ScriptAlias
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<em>URL-path file-path</em>|<em>directory-path</em></syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>The <directive>ScriptAlias</directive> directive has the same
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding behavior as the <directive module="mod_alias">Alias</directive>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd directive, except that in addition it marks the target directory
a8ce9095d102e43fecb81093a132b90b9a227f78kess as containing CGI scripts that will be processed by <module
684f2a9a422185adda0692a1203c5ad6687fc5c5nd >mod_cgi</module>'s cgi-script handler. URLs with a
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding (%-decoded) path beginning with <em>URL-path</em> will be mapped
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to scripts beginning with the second argument which is a full
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding pathname in the local filesystem.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>Example:</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<example>ScriptAlias /cgi-bin/ /web/cgi-bin/</example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server to run the script <code>/web/cgi-bin/foo</code>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<name>ScriptAliasMatch</name>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<description>Maps a URL to a filesystem location using a regular expression
843a03fe0b138a4c1f64cb90a014e9417ac30691fieldingand designates the target as a CGI script</description>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<syntax>ScriptAliasMatch
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<em>regex file-path</em>|<em>directory-path</em></syntax>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<contextlist><context>server config</context><context>virtual host</context>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</contextlist>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>This directive is equivalent to <directive module="mod_alias"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >ScriptAlias</directive>, but makes use of standard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regular expressions, instead of simple prefix matching. The
77ead9e0262e4f08ec336d1a65b2edef7705c839nd supplied regular expression is matched against the URL-path,
77ead9e0262e4f08ec336d1a65b2edef7705c839nd and if it matches, the server will substitute any parenthesized
9583adab6bc4b3758e41963c905d9dad9f067131nd matches into the given string and use it as a filename. For
77ead9e0262e4f08ec336d1a65b2edef7705c839nd example, to activate the standard <code>/cgi-bin</code>, one
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier might use:</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</example>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</usage>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</modulesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd