diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:50 +0000 |
commit | fe39ffb8b90ae4e002ed73fe98617cd590abb467 (patch) | |
tree | b80e5956907d8aeaaffe4e4f0c068c0e6157ce8b /docs/manual/urlmapping.html | |
parent | Initial commit. (diff) | |
download | apache2-upstream/2.4.56.tar.xz apache2-upstream/2.4.56.zip |
Adding upstream version 2.4.56.upstream/2.4.56upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | docs/manual/urlmapping.html | 21 | ||||
-rw-r--r-- | docs/manual/urlmapping.html.en | 379 | ||||
-rw-r--r-- | docs/manual/urlmapping.html.fr.utf8 | 402 | ||||
-rw-r--r-- | docs/manual/urlmapping.html.ja.utf8 | 318 | ||||
-rw-r--r-- | docs/manual/urlmapping.html.ko.euc-kr | 277 | ||||
-rw-r--r-- | docs/manual/urlmapping.html.tr.utf8 | 365 |
6 files changed, 1762 insertions, 0 deletions
diff --git a/docs/manual/urlmapping.html b/docs/manual/urlmapping.html new file mode 100644 index 0000000..ef6cbf1 --- /dev/null +++ b/docs/manual/urlmapping.html @@ -0,0 +1,21 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: urlmapping.html.en +Content-Language: en +Content-type: text/html; charset=UTF-8 + +URI: urlmapping.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: urlmapping.html.ja.utf8 +Content-Language: ja +Content-type: text/html; charset=UTF-8 + +URI: urlmapping.html.ko.euc-kr +Content-Language: ko +Content-type: text/html; charset=EUC-KR + +URI: urlmapping.html.tr.utf8 +Content-Language: tr +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en new file mode 100644 index 0000000..5dd32c0 --- /dev/null +++ b/docs/manual/urlmapping.html.en @@ -0,0 +1,379 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Mapping URLs to Filesystem Locations - Apache HTTP Server Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<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.4</a></div><div id="page-content"><div id="preamble"><h1>Mapping URLs to Filesystem Locations</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="./en/urlmapping.html" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>This document explains how the Apache HTTP Server uses the URL of a request + to determine the filesystem location from which to serve a + file.</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">Related Modules and Directives</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#outside">Files Outside the DocumentRoot</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#user">User Directories</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#redirect">URL Redirection</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#proxy">Reverse Proxy</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#rewrite">Rewriting Engine</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#other">Other URL Mapping Modules</a></li> +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="related" id="related">Related Modules and Directives</a></h2> + +<table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="documentroot" id="documentroot">DocumentRoot</a></h2> + + <p>In deciding what file to serve for a given request, httpd's + default behavior is to take the URL-Path for the request (the part + of the URL following the hostname and port) and add it to the end + of the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> specified + in your configuration files. Therefore, the files and directories + underneath the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + make up the basic document tree which will be visible from the + web.</p> + + <p>For example, if <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + were set to <code>/var/www/html</code> then a request for + <code>http://www.example.com/fish/guppies.html</code> would result + in the file <code>/var/www/html/fish/guppies.html</code> being + served to the requesting client.</p> + + <p>If a directory is requested (i.e. a path ending with + <code>/</code>), the file served from that directory is defined by + the <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> directive. + For example, if <code>DocumentRoot</code> were set as above, and + you were to set:</p> + + <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div> + + <p>Then a request for <code>http://www.example.com/fish/</code> will + cause httpd to attempt to serve the file + <code>/var/www/html/fish/index.html</code>. In the event that + that file does not exist, it will next attempt to serve the file + <code>/var/www/html/fish/index.php</code>.</p> + + <p>If neither of these files existed, the next step is to + attempt to provide a directory index, if + <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> is loaded and configured to permit + that.</p> + + <p>httpd is also capable of <a href="vhosts/">Virtual + Hosting</a>, where the server receives requests for more than one + host. In this case, a different <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> can be specified for each + virtual host, or alternatively, the directives provided by the + module <code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code> can + be used to dynamically determine the appropriate place from which + to serve content based on the requested IP address or + hostname.</p> + + <p>The <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> directive + is set in your main server configuration file + (<code>httpd.conf</code>) and, possibly, once per additional <a href="vhosts/">Virtual Host</a> you create.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="outside" id="outside">Files Outside the DocumentRoot</a></h2> + + <p>There are frequently circumstances where it is necessary to + allow web access to parts of the filesystem that are not strictly + underneath the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>. httpd offers several + different ways to accomplish this. On Unix systems, symbolic links + can bring other parts of the filesystem under the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>. For security reasons, + httpd will follow symbolic links only if the <code class="directive"><a href="./mod/core.html#options">Options</a></code> setting for the relevant + directory includes <code>FollowSymLinks</code> or + <code>SymLinksIfOwnerMatch</code>.</p> + + <p>Alternatively, the <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> directive will map any part + of the filesystem into the web space. For example, with</p> + +<pre class="prettyprint lang-config">Alias "/docs" "/var/web"</pre> + + + <p>the URL <code>http://www.example.com/docs/dir/file.html</code> + will be served from <code>/var/web/dir/file.html</code>. The + <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> directive + works the same way, with the additional effect that all content + located at the target path is treated as <a class="glossarylink" href="./glossary.html#cgi" title="see glossary">CGI</a> scripts.</p> + + <p>For situations where you require additional flexibility, you + can use the <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> + and <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> + directives to do powerful <a class="glossarylink" href="./glossary.html#regex" title="see glossary">regular + expression</a> based matching and substitution. For + example,</p> + + <pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"</pre> + + + <p>will map a request to + <code>http://example.com/~user/cgi-bin/script.cgi</code> to the + path <code>/home/user/cgi-bin/script.cgi</code> and will treat + the resulting file as a CGI script.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="user" id="user">User Directories</a></h2> + + <p>Traditionally on Unix systems, the home directory of a + particular <em>user</em> can be referred to as + <code>~user/</code>. The module <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> + extends this idea to the web by allowing files under each user's + home directory to be accessed using URLs such as the + following.</p> + +<div class="example"><p><code>http://www.example.com/~user/file.html</code></p></div> + + <p>For security reasons, it is inappropriate to give direct + access to a user's home directory from the web. Therefore, the + <code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code> directive + specifies a directory underneath the user's home directory + where web files are located. Using the default setting of + <code>Userdir public_html</code>, the above URL maps to a file + at a directory like + <code>/home/user/public_html/file.html</code> where + <code>/home/user/</code> is the user's home directory as + specified in <code>/etc/passwd</code>.</p> + + <p>There are also several other forms of the + <code>Userdir</code> directive which you can use on systems + where <code>/etc/passwd</code> does not contain the location of + the home directory.</p> + + <p>Some people find the "~" symbol (which is often encoded on the + web as <code>%7e</code>) to be awkward and prefer to use an + alternate string to represent user directories. This functionality + is not supported by mod_userdir. However, if users' home + directories are structured in a regular way, then it is possible + to use the <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> + directive to achieve the desired effect. For example, to make + <code>http://www.example.com/upages/user/file.html</code> map to + <code>/home/user/public_html/file.html</code>, use the following + <code>AliasMatch</code> directive:</p> + + <pre class="prettyprint lang-config">AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$" "/home/$1/public_html/$3"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="redirect" id="redirect">URL Redirection</a></h2> + + <p>The configuration directives discussed in the above sections + tell httpd to get content from a specific place in the filesystem + and return it to the client. Sometimes, it is desirable instead to + inform the client that the requested content is located at a + different URL, and instruct the client to make a new request with + the new URL. This is called <em>redirection</em> and is + implemented by the <code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code> directive. For example, if + the contents of the directory <code>/foo/</code> under the + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> are moved + to the new directory <code>/bar/</code>, you can instruct clients + to request the content at the new location as follows:</p> + + <pre class="prettyprint lang-config">Redirect permanent "/foo/" "http://www.example.com/bar/"</pre> + + + <p>This will redirect any URL-Path starting in + <code>/foo/</code> to the same URL path on the + <code>www.example.com</code> server with <code>/bar/</code> + substituted for <code>/foo/</code>. You can redirect clients to + any server, not only the origin server.</p> + + <p>httpd also provides a <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> directive for more + complicated rewriting problems. For example, to redirect requests + for the site home page to a different site, but leave all other + requests alone, use the following configuration:</p> + + <pre class="prettyprint lang-config">RedirectMatch permanent "^/$" "http://www.example.com/startpage.html"</pre> + + + <p>Alternatively, to temporarily redirect all pages on one site + to a particular page on another site, use the following:</p> + + <pre class="prettyprint lang-config">RedirectMatch temp ".*" "http://othersite.example.com/startpage.html"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="proxy" id="proxy">Reverse Proxy</a></h2> + +<p>httpd also allows you to bring remote documents into the URL space +of the local server. This technique is called <em>reverse +proxying</em> because the web server acts like a proxy server by +fetching the documents from a remote server and returning them to the +client. It is different from normal (forward) proxying because, to the client, +it appears the documents originate at the reverse proxy server.</p> + +<p>In the following example, when clients request documents under the +<code>/foo/</code> directory, the server fetches those documents from +the <code>/bar/</code> directory on <code>internal.example.com</code> +and returns them to the client as if they were from the local +server.</p> + +<pre class="prettyprint lang-config">ProxyPass "/foo/" "http://internal.example.com/bar/" +ProxyPassReverse "/foo/" "http://internal.example.com/bar/" +ProxyPassReverseCookieDomain internal.example.com public.example.com +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre> + + +<p>The <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> configures +the server to fetch the appropriate documents, while the +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> +directive rewrites redirects originating at +<code>internal.example.com</code> so that they target the appropriate +directory on the local server. Similarly, the +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> +and <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code> +rewrite cookies set by the backend server.</p> +<p>It is important to note, however, that +links inside the documents will not be rewritten. So any absolute +links on <code>internal.example.com</code> will result in the client +breaking out of the proxy server and requesting directly from +<code>internal.example.com</code>. You can modify these links (and other +content) in a page as it is being served to the client using +<code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>.</p> + +<pre class="prettyprint lang-config">Substitute "s/internal\.example\.com/www.example.com/i"</pre> + + +<p>For more sophisticated rewriting of links in HTML and XHTML, the +<code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> module is also available. It allows you +to create maps of URLs that need to be rewritten, so that complex +proxying scenarios can be handled.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="rewrite" id="rewrite">Rewriting Engine</a></h2> + + <p>When even more powerful substitution is required, the rewriting + engine provided by <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> + can be useful. The directives provided by this module can use + characteristics of the request such as browser type or source IP + address in deciding from where to serve content. In addition, + mod_rewrite can use external database files or programs to + determine how to handle a request. The rewriting engine is capable + of performing all three types of mappings discussed above: + internal redirects (aliases), external redirects, and proxying. + Many practical examples employing mod_rewrite are discussed in the + <a href="rewrite/">detailed mod_rewrite documentation</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="notfound" id="notfound">File Not Found</a></h2> + + <p>Inevitably, URLs will be requested for which no matching + file can be found in the filesystem. This can happen for + several reasons. In some cases, it can be a result of moving + documents from one location to another. In this case, it is + best to use <a href="#redirect">URL redirection</a> to inform + clients of the new location of the resource. In this way, you + can assure that old bookmarks and links will continue to work, + even though the resource is at a new location.</p> + + <p>Another common cause of "File Not Found" errors is + accidental mistyping of URLs, either directly in the browser, + or in HTML links. httpd provides the module + <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> (sic) to help with + this problem. When this module is activated, it will intercept + "File Not Found" errors and look for a resource with a similar + filename. If one such file is found, mod_speling will send an + HTTP redirect to the client informing it of the correct + location. If several "close" files are found, a list of + available alternatives will be presented to the client.</p> + + <p>An especially useful feature of mod_speling, is that it will + compare filenames without respect to case. This can help + systems where users are unaware of the case-sensitive nature of + URLs and the unix filesystem. But using mod_speling for + anything more than the occasional URL correction can place + additional load on the server, since each "incorrect" request + is followed by a URL redirection and a new request from the + client.</p> + + <p><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> provides <code class="directive"><a href="./mod/mod_dir.html#fallbackresource">FallbackResource</a></code>, which can be used to map virtual + URIs to a real resource, which then serves them. This is a very + useful replacement for <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> when implementing + a 'front controller'</p> + + <p>If all attempts to locate the content fail, httpd returns + an error page with HTTP status code 404 (file not found). The + appearance of this page is controlled with the + <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> directive + and can be customized in a flexible manner as discussed in the + <a href="custom-error.html">Custom error responses</a> + document.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="other" id="other">Other URL Mapping Modules</a></h2> + + + + <p>Other modules available for URL mapping include:</p> + + <ul> + <li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code> - Maps a request to a CGI script + based on the request method, or resource MIME type.</li> + <li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> - Provides basic mapping of a trailing + slash into an index file such as <code>index.html</code>.</li> + <li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code> - Maps a request to a URL based + on where a user clicks on an image embedded in a HTML document.</li> + <li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> - Selects an appropriate + document based on client preferences such as language or content + compression.</li> + </ul> + +</div></div> +<div class="bottomlang"> +<p><span>Available Languages: </span><a href="./en/urlmapping.html" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 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> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/urlmapping.html.fr.utf8 b/docs/manual/urlmapping.html.fr.utf8 new file mode 100644 index 0000000..aea08c7 --- /dev/null +++ b/docs/manual/urlmapping.html.fr.utf8 @@ -0,0 +1,402 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title> Mise en correspondance des URLs avec le système de fichiers - Serveur HTTP Apache Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p> +<p class="apache">Serveur HTTP Apache Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Serveur HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1> Mise en correspondance des URLs avec le système de fichiers</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>Ce document explique comment le serveur HTTP Apache utilise l'URL contenue dans une + requête pour déterminer le noeud du système de fichier à partir duquel le + fichier devra être servi.</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">Modules et directives concernés</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#documentroot">Racine des documents (DocumentRoot)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#outside">Fichiers situés en dehors de +l'arborescence DocumentRoot</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#user">Répertoires des utilisateurs</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#redirect">Redirection d'URL</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#proxy">Mandataire inverse (Reverse Proxy)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#rewrite">Moteur de réécriture</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#notfound">Fichier non trouvé (File Not Found)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#other">Autres modules de mise en correspondance des +URLs</a></li> +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="related" id="related">Modules et directives concernés</a></h2> + +<table class="related"><tr><th>Modules Apparentés</th><th>Directives Apparentées</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="documentroot" id="documentroot">Racine des documents (DocumentRoot)</a></h2> + + <p>La méthode par défaut de httpd pour déterminer quel fichier servir pour + une requête donnée, consiste à extraire le chemin du fichier de la requête + (la partie de l'URL qui suit le nom d'hôte et le port), puis de l'ajouter + à la fin de la valeur de la directive + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> définie dans vos fichiers + de configuration. + Ainsi, les fichiers et répertoires + situés en dessous de <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + constituent l'arborescence de base des documents qui seront visibles + depuis le web.</p> + + <p>Par exemple, si la directive + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> contient + <code>/var/www/html</code>, une requête pour + <code>http://www.example.com/fish/guppies.html</code> retournera le + fichier <code>/var/www/html/fish/guppies.html</code> au client.</p> + + <p>Si la requête concerne un répertoire (autrement dit un chemin se + terminant par un slash <code>/</code>), le nom du fichier qui sera + recherché et servi depuis ce répertoire est défini via la directive + <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>. Par exemple, + supposons que <code>DocumentRoot</code> ait été définie comme + précédemment, et que vous ayez défini <code>DirectoryIndex</code> + comme suit :</p> + + <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div> + + <p>Si httpd reçoit alors une requête pour + <code>http://www.example.com/fish/</code>, il tentera de servir le + fichier <code>/var/www/html/fish/index.html</code>. Si ce fichier + n'existe pas, il tentera de servir le fichier + <code>/var/www/html/fish/index.php</code>.</p> + + <p>Si aucun de ces fichiers existe, httpd tentera de générer et + d'afficher un index du répertoire, à condition que + <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> ait été chargé et configuré pour le + permettre.</p> + + <p>httpd supporte aussi les <a href="vhosts/">Hôtes virtuels</a>, + ce qui lui permet de traiter des requêtes pour plusieurs hôtes. + Dans ce cas, un <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + différent peut être défini pour chaque hôte virtuel; + les directives fournies par le module + <code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code> peuvent aussi être utilisées afin de + déterminer dynamiquement le noeud approprié du système de fichiers + à partir duquel servir un contenu en fonction de l'adresse IP + ou du nom d'hôte.</p> + + <p>La directive <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> est + définie dans le fichier de configuration de votre serveur principal + (<code>httpd.conf</code>), mais peut aussi être redéfinie pour chaque + <a href="vhosts/">Hôte virtuel</a> supplémentaire que vous avez créé.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="outside" id="outside">Fichiers situés en dehors de +l'arborescence DocumentRoot</a></h2> + + <p>Il existe de nombreuses circonstances pour lesquelles il est nécessaire + d'autoriser l'accès web à des portions du système de fichiers qui ne se + trouvent pas dans l'arborescence <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>. httpd propose de nombreuses + solutions pour réaliser cela. Sur les systèmes Unix, les liens + symboliques permettent de rattacher d'autres portions du système de + fichiers au <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>. Pour des raisons de sécurité, + httpd ne suivra les liens symboliques que si les <code class="directive"><a href="./mod/core.html#options">Options</a></code> pour le répertoire concerné contiennent + <code>FollowSymLinks</code> ou <code>SymLinksIfOwnerMatch</code>.</p> + + <p>Une autre méthode consiste à utiliser la directive <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> pour rattacher toute portion + du système de fichiers à l'arborescence du site web. Par exemple, avec</p> + +<pre class="prettyprint lang-config">Alias "/docs" "/var/web"</pre> + + + <p>l'URL <code>http://www.example.com/docs/dir/file.html</code> + correspondra au fichier <code>/var/web/dir/file.html</code>. La + directive + <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + fonctionne de la même manière, excepté que tout contenu localisé dans le + chemin cible sera traité comme un script <a class="glossarylink" href="./glossary.html#cgi" title="voir glossaire">CGI</a>.</p> + + <p>Pour les situations qui nécessitent plus de flexibilité, vous disposez + des directives <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> + et <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> + qui permettent des substitutions et comparaisons puissantes basées + sur les <a class="glossarylink" href="./glossary.html#regex" title="voir glossaire">expressions rationnelles</a>. + Par exemple,</p> + +<pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"</pre> + + + <p>fera correspondre une requête du style + <code>http://example.com/~user/cgi-bin/script.cgi</code> au chemin + <code>/home/user/cgi-bin/script.cgi</code>, et traitera le fichier résultant + comme un script CGI.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="user" id="user">Répertoires des utilisateurs</a></h2> + + <p>Sur les systèmes Unix, on peut traditionnellement faire référence + au répertoire personnel d'un <em>utilisateur</em> particulier à l'aide de + l'expression <code>~user/</code>. + Le module <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> + étend cette idée au web en autorisant l'accès aux fichiers situés dans les + répertoires home des utilisateurs à l'aide d'URLs + comme dans ce qui suit :</p> + +<div class="example"><p><code>http://www.example.com/~user/file.html</code></p></div> + + <p>Pour des raisons de sécurité, il est déconseillé de permettre un accès + direct à un répertoire home d'utilisateur depuis le web. A cet effet, la + directive <code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code> + spécifie un répertoire où sont situés les fichiers accessibles depuis le web + dans le répertoire home de l'utilisateur. + Avec la configuration par défaut + <code>Userdir public_html</code>, l'URL ci-dessus correspondra à un fichier + dont le chemin sera du style + <code>/home/user/public_html/file.html</code> où + <code>/home/user/</code> est le répertoire home de l'utilisateur tel qu'il + est défini dans <code>/etc/passwd</code>.</p> + + <p>La directive <code>Userdir</code> met à votre disposition de nombreuses + formes différentes pour les systèmes où <code>/etc/passwd</code> ne + spécifie pas la localisation du répertoire home.</p> + + <p>Certains jugent le symbole "~" (dont le code sur le web est souvent + <code>%7e</code>) inapproprié et préfèrent utiliser une chaîne de + caractères différente pour représenter les répertoires utilisateurs. + mod_userdir ne supporte pas cette fonctionnalité. Cependant, si les + répertoires home des utilisateurs sont structurés de manière rationnelle, + il est possible d'utiliser la directive + <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> + pour obtenir l'effet désiré. Par exemple, pour faire correspondre + <code>http://www.example.com/upages/user/file.html</code> à + <code>/home/user/public_html/file.html</code>, utilisez la directive + <code>AliasMatch</code> suivante :</p> + +<pre class="prettyprint lang-config">AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$" "/home/$1/public_html/$3"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="redirect" id="redirect">Redirection d'URL</a></h2> + + <p>Les directives de configuration décrites dans les sections précédentes + demandent à httpd d'extraire un contenu depuis un emplacement spécifique + du système de fichiers + et de la retourner au client. Il est cependant parfois + souhaitable d'informer le + client que le contenu demandé est localisé à une URL différente, et de + demander au client d'élaborer une nouvelle requête avec la nouvelle URL. + Ce processus se nomme <em>redirection</em> et est implémenté par la + directive <code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code>. + Par exemple, si le contenu du répertoire <code>/foo/</code> sous + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> est déplacé vers le + nouveau répertoire <code>/bar/</code>, vous pouvez demander aux clients + de le requérir à sa nouvelle localisation comme suit :</p> + +<pre class="prettyprint lang-config">Redirect permanent "/foo/" "http://www.example.com/bar/"</pre> + + + <p>Ceci aura pour effet de rediriger tout chemin d'URL commençant par + <code>/foo/</code> vers le même chemin d'URL sur le serveur + <code>www.example.com</code> en remplaçant <code>/foo/</code> par + <code>/bar/</code>. Vous pouvez rediriger les clients non seulement sur le + serveur d'origine, mais aussi vers n'importe quel autre serveur.</p> + + <p>httpd propose aussi la directive <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> pour traiter les problèmes + de réécriture d'une plus grande complexité. Par exemple, afin de rediriger + les requêtes pour la page d'accueil du site vers un site différent, mais + laisser toutes les autres requêtes inchangées, utilisez la + configuration suivante :</p> + +<pre class="prettyprint lang-config">RedirectMatch permanent "^/$" "http://www.example.com/startpage.html"</pre> + + + <p>De même, pour rediriger temporairement toutes les pages d'un site + vers une page particulière d'un autre site, utilisez ce qui suit :</p> + +<pre class="prettyprint lang-config">RedirectMatch temp ".*" "http://othersite.example.com/startpage.html"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="proxy" id="proxy">Mandataire inverse (Reverse Proxy)</a></h2> + +<p>httpd vous permet aussi de rapatrier des documents distants +dans l'espace des URL du serveur local. +Cette technique est appelée <em>mandataire inverse ou reverse +proxying</em> car le serveur web agit comme un serveur mandataire en +rapatriant les documents depuis un serveur distant puis les renvoyant +au client. Ceci diffère d'un service de mandataire usuel (direct) car, pour le client, +les documents semblent appartenir au serveur mandataire inverse.</p> + +<p>Dans l'exemple suivant, quand les clients demandent des documents situés +dans le répertoire +<code>/foo/</code>, le serveur rapatrie ces documents depuis le répertoire +<code>/bar/</code> sur <code>internal.example.com</code> +et les renvoie au client comme s'ils appartenaient au serveur local.</p> + +<pre class="prettyprint lang-config">ProxyPass "/foo/" "http://internal.example.com/bar/" +ProxyPassReverse "/foo/" "http://internal.example.com/bar/" +ProxyPassReverseCookieDomain internal.example.com public.example.com +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre> + + +<p>La directive <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> configure +le serveur pour rapatrier les documents appropriés, alors que la directive +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> +réécrit les redirections provenant de +<code>internal.example.com</code> de telle manière qu'elles ciblent le +répertoire approprié sur le serveur local. De manière similaire, les directives +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> +et <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code> +réécrivent les cookies élaborés par le serveur d'arrière-plan.</p> +<p>Il est important de noter cependant, que les liens situés dans les documents +ne seront pas réécrits. Ainsi, tout lien absolu sur +<code>internal.example.com</code> fera décrocher le client +du serveur mandataire et effectuer sa requête directement sur +<code>internal.example.com</code>. Vous pouvez modifier ces liens (et +d'utres contenus) situés dans la page au moment où elle est envoyée au +client en utilisant le module <code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>.</p> + +<pre class="prettyprint lang-config">Substitute "s/internal\.example\.com/www.example.com/i"</pre> + + +<p>Le module <code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> rend possible une réécriture plus +élaborée des liens en HTML et XHTML. Il permet de créer des listes +d'URLs et de leurs réécritures, de façon à pouvoir gérer des scénarios +de réécriture complexes.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="rewrite" id="rewrite">Moteur de réécriture</a></h2> + + <p>Le moteur de réécriture <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> peut s'avérer + utile lorsqu'une substitution plus puissante est nécessaire. + Les directives fournies par ce module peuvent utiliser des caractéristiques de la + requête comme le type de navigateur ou l'adresse IP source afin de décider + depuis où servir le contenu. En outre, mod_rewrite peut utiliser des + fichiers ou programmes de bases de données externes pour déterminer comment + traiter une requête. Le moteur de réécriture peut effectuer les trois types + de mise en correspondance discutés plus haut : + redirections internes (aliases), redirections externes, et services mandataires. + De nombreux exemples pratiques utilisant mod_rewrite sont discutés dans la + <a href="rewrite/">documentation détaillée de mod_rewrite</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="notfound" id="notfound">Fichier non trouvé (File Not Found)</a></h2> + + <p>Inévitablement, apparaîtront des URLs qui ne correspondront à aucun + fichier du système de fichiers. + Ceci peut arriver pour de nombreuses raisons. + Il peut s'agir du déplacement de documents d'une + localisation vers une autre. Dans ce cas, le mieux est d'utiliser la + <a href="#redirect">redirection d'URL</a> pour informer les clients de la + nouvelle localisation de la ressource. De cette façon, vous êtes sur que + les anciens signets et liens continueront de fonctionner, même si la + ressource est déplacée.</p> + + <p>Une autre cause fréquente d'erreurs "File Not Found" est l'erreur de + frappe accidentelle dans les URLs, soit directement dans le navigateur, + soit dans les liens HTML. httpd propose le module + <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> (sic) pour tenter de résoudre ce problème. + Lorsque ce module est activé, il intercepte les erreurs + "File Not Found" et recherche une ressource possédant un nom de fichier + similaire. Si un tel fichier est trouvé, mod_speling va envoyer une + redirection HTTP au client pour lui communiquer l'URL correcte. + Si plusieurs fichiers proches sont trouvés, une liste des alternatives + possibles sera présentée au client.</p> + + <p>mod_speling possède une fonctionnalité particulièrement utile : + il compare les noms de fichiers sans tenir compte de la casse. + Ceci peut aider les systèmes où les utilisateurs ne connaissent pas la + sensibilité des URLs à la casse et bien sûr les systèmes de fichiers unix. + Mais l'utilisation de mod_speling pour toute autre chose que la correction + occasionnelle d'URLs peut augmenter la charge du serveur, car chaque + requête "incorrecte" entraîne une redirection d'URL et une nouvelle requête + de la part du client.</p> + + <p><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> fournit la directive <code class="directive"><a href="./mod/mod_dir.html#fallbackresource">FallbackResource</a></code> qui permet d'associer + des URIs virtuels à une ressource réelle qui peut ainsi les servir. + Cette directive remplace avantageusement + <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> lors de l'implémentation d'un + "contrôleur frontal".</p> + + <p>Si toutes les tentatives pour localiser le contenu + échouent, httpd + retourne une page d'erreur avec le code de statut HTTP 404 + (file not found). L'apparence de cette page est contrôlée à l'aide de la + directive <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + et peut être personnalisée de manière très flexible comme discuté dans le + document + <a href="custom-error.html">Réponses personnalisées aux erreurs</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="other" id="other">Autres modules de mise en correspondance des +URLs</a></h2> + + + + <p>Les autres modules disponibles pour la mise en correspondance des + URLs sont :</p> + <ul> + <li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code> - Met une URL en correspondance + avec un script CGI en fonction de la méthode de la requête, ou du + type MIME de la ressource.</li> + <li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> - Permet une mise en correspondance + basique d'un slash terminal dans un fichier index comme + <code>index.html</code>.</li> + <li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code> - Met en correspondance une + requête avec une URL en fonction de la zone d'une image intégrée à + un document HTML dans laquelle un utilisateur clique.</li> + <li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> - Sélectionne le document + approprié en fonction de préférences du client telles que la langue + ou la compression du contenu.</li> + </ul> + +</div></div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/urlmapping.html.ja.utf8 b/docs/manual/urlmapping.html.ja.utf8 new file mode 100644 index 0000000..33163c2 --- /dev/null +++ b/docs/manual/urlmapping.html.ja.utf8 @@ -0,0 +1,318 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>URL からファイルシステム上の位置へのマップ - Apache HTTP サーバ バージョン 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p> +<p class="apache">Apache HTTP サーバ バージョン 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="./">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>URL からファイルシステム上の位置へのマップ</h1> +<div class="toplang"> +<p><span>翻訳済み言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 + </div> + + <p>この文書は Apache がリクエストの URL から送信するファイルの + ファイルシステム上の位置を決定する方法を説明します。</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">関連するモジュールとディレクティブ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#outside">DocumentRoot 外のファイル</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#user">ユーザディレクトリ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#redirect">URL リダイレクション</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#proxy">リバースプロキシ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#rewrite">リライトエンジン</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li> +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="related" id="related">関連するモジュールとディレクティブ</a></h2> + +<table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritematch">RewriteMatch</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="documentroot" id="documentroot">DocumentRoot</a></h2> + + <p>リクエストに対してどのファイルを送信するかを決定するときの + Apache のデフォルトの動作は、リクエストの URL-Path (URL のホスト名と + ポート番号の後に続く部分) を取り出して設定ファイルで指定されている + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + の最後に追加する、というものです。ですから、 + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + の下のディレクトリやファイルがウェブから見える基本のドキュメントの木構造を + なします。</p> + + <p>Apache にはサーバが複数のホストへのリクエストを受け取る + <a href="vhosts/">バーチャルホスト</a> の機能もあります。 + この場合、それぞれのバーチャルホストに対して違う + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + を指定することができます。また、<code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code> + モジュールにより提供されるディレクティブを使って、 + 送信するためのコンテンツの場所をリクエストされた IP + アドレスやホスト名から動的に決めることもできます。</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="outside" id="outside">DocumentRoot 外のファイル</a></h2> + + <p>ファイルシステム上の、 + 厳密には <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + の下にはない部分へのウェブアクセスを許可する必要がある + 場合がよくあります。Apache はこのために複数の方法を用意しています。 + Unix システムでは、ファイルシステムの他の部分をシンボリックリンクを + 使って <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + の下に持ってくることができます。セキュリティ上の理由により、 + Apache は該当するディレクトリの + <code class="directive"><a href="./mod/core.html#options">Options</a></code> の設定に + <code>FollowSymLinks</code> か <code>SymLinksIfOwnerMatch</code> が + ある場合にのみシンボリックリンクをたどります。</p> + + <p>代わりの方法として、<code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> + ディレクティブを使ってファイルシステムの任意の部分をウェブの空間に + マップできます。たとえば、</p> + +<div class="example"><p><code>Alias /docs /var/web</code></p></div> + + <p>という設定のときは、URL + <code>http://www.example.com/docs/dir/file.html</code> には + <code>/var/web/dir/file.html</code> が送信されます。 + <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> も、 + 対象となっているパスが CGI スクリプトとして扱われるという追加の + 効果以外は同じように動作します。</p> + + <p>もっと柔軟な設定が必要な状況では、 + <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> ディレクティブや + <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> ディレクティブ + を使って強力な正規表現に基づいたマッチと置換を行なうことができます。 + たとえば、</p> + +<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) + /home/$1/cgi-bin/$2</code></p></div> + + <p>は <code>http://example.com/~user/cgi-bin/script.cgi</code> への + リクエストを <code>/home/user/cgi-bin/script.cgi</code> というパスへ + マップし、このマップの結果としてのファイルを CGI スクリプトとして + 扱います。</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="user" id="user">ユーザディレクトリ</a></h2> + + <p>伝統的に Unix システムではユーザ <em>user</em> のホームディレクトリを + <code>~user/</code> として参照できます。<code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> + モジュールはこの概念をウェブに拡張して、 + それぞれのユーザのホームディレクトリのファイルを + 以下のような URL を使ってアクセスできるようにします。</p> + +<div class="example"><p><code>http://www.example.com/~user/file.html</code></p></div> + + <p>セキュリティの観点から、ウェブからユーザのホームディレクトリへ + 直接アクセスできるようにすることは適切ではありません。ですから、 + <code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブには + ユーザのホームディレクトリの下の、ウェブファイルの + 置かれているディレクトリを指定します。デフォルトの設定の + <code>Userdir public_html</code> を使うと、上の URL は + <code>/home/user/public_html/file.html</code> というようなファイルに + マップされます。ここで、<code>/home/user/</code> は + <code>/etc/passwd</code> で指定されているユーザのホームディレクトリです。</p> + + <p><code class="directive"><a href="./mod/mod_userdir.html#userdir">Userdir</a></code> には、 + <code>/etc/passwd</code> にホームディレクトリの位置が書かれていない + システムでも使うことのできる他の形式もあります。</p> + + <p>中にはシンボル "~" (<code>%7e</code> のように符号化されることが多い) + を格好が悪いと思って、ユーザのディレクトリを表すために別の文字列の + 使用を好む人がいます。mod_userdir はこの機能をサポートしていません。 + しかし、ユーザのホームディレクトリが規則的な構成のときは、 + <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> を使って望みの + 効果を達成することができます。たとえば、 + <code>http://www.example.com/upages/user/file.html</code> が + <code>/home/user/public_html/file.html</code> にマップされるようにするには、 + 以下のように <code>AliasMatch</code> ディレクティブを使います:</p> + +<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*) + /home/$1/public_html/$2</code></p></div> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="redirect" id="redirect">URL リダイレクション</a></h2> + + <p>上の節で説明した設定用のディレクティブは Apache に + ファイルシステムの特定の場所からコンテンツを取ってきて + クライアントに送り返すようにします。ときには、その代わりに + クライアントにリクエストされたコンテンツは別の URL にあることを + 知らせて、クライアントが新しい URL へ新しいリクエストを行なうように + する方が望ましいことがあります。これは<em>リダイレクション</em>と + 呼ばれていて、<code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code> + ディレクティブにより実装されています。たとえば、 + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> の下のディレクトリ + <code>/foo/</code> が新しいディレクトリ <code>/bar/</code> に移動したときは、 + 以下のようにしてクライアントが新しい場所のコンテンツをリクエストするように + 指示することができます:</p> + +<div class="example"><p><code>Redirect permanent /foo/ + http://www.example.com/bar/</code></p></div> + + <p>これは、<code>/foo/</code> で始まるすべての URL-Path を、 + <code>www.example.com</code> サーバの <code>/bar/</code> が + <code>/foo/</code> に置換されたものにリダイレクトします。 + サーバは自分自身のサーバだけでなく、どのサーバにでもクライアントを + リダイレクトすることができます。</p> + + <p>Apache はより複雑な書き換えの問題のために、 + <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> ディレクティブを + 提供しています。たとえば、サイトのホームページを違うサイトにリダイレクト + するけれど、他のリクエストはそのまま扱う、というときは以下の設定を + 使います:</p> + +<div class="example"><p><code>RedirectMatch permanent ^/$ + http://www.example.com/startpage.html</code></p></div> + + <p>あるいは、一時的にサイトのすべてのページを他のサイトの特定の + ページへリダイレクトするときは、以下を使います:</p> + +<div class="example"><p><code>RedirectMatch temp .* + http://othersite.example.com/startpage.html</code></p></div> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="proxy" id="proxy">リバースプロキシ</a></h2> + +<p>Apache は遠隔地にあるドキュメントをローカルのサーバの URL 空間に +持ってくることもできます。この手法は<em>リバースプロキシ</em>と呼ばれています。 +ウェブサーバが遠隔地のドキュメントを取得してクライアントに送り返すのが +プロキシサーバの動作のように見えるからです。クライアントにはドキュメントが +リバースプロキシサーバから送られてきているように見える点が通常の +プロキシとは異なります。</p> + +<p>次の例では、クライアントが <code>/foo/</code> ディレクトリの下にある +ドキュメントをリクエストすると、サーバが <code>internal.example.com</code> の +<code>/bar/</code> ディレクトリから取得して、さもローカルサーバからの +ドキュメントのようにしてクライアントに返します。</p> + +<div class="example"><p><code> +ProxyPass /foo/ http://internal.example.com/bar/<br /> +ProxyPassReverse /foo/ http://internal.example.com/bar/<br /> +ProxyPassReverseCookieDomain internal.example.com public.example.com<br /> +ProxyPassReverseCookiePath /foo/ /bar/ +</code></p></div> + +<p><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> ディレクティブは +サーバが適切なドキュメントを取得するように設定し、 +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> ディレクティブは +<code>internal.example.com</code> からのリダイレクトがローカルサーバの +適切なディレクトリを指すように書き換えます。 +同様に <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> +と <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code> +でバックエンド側サーバの発行した Cookie を書き換えることができます。</p> +<p>ただし、ドキュメントの中のリンクは書き換えられない、 +ということは知っておいてください。 +ですから、<code>internal.example.com</code> への絶対パスによるリンクでは、 +クライアントがプロキシサーバを抜け出して <code>internal.example.com</code> に +直接リクエストを送る、ということになります。 +サードパーティ製モジュールの <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a> +は、HTML と XHTML 中のリンクを書き換えることができます。</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="rewrite" id="rewrite">リライトエンジン</a></h2> + + <p>より一層強力な置換が必要なときは、<code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> + が提供するリライトエンジンが役に立つでしょう。 + このモジュールにより提供されるディレクティブは + ブラウザの種類、リクエスト元の IP アドレスなどのリクエストの特徴を + 使って送り返すコンテンツの場所を決めます。さらに、<code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> + は外部のデータベースファイルやプログラムを使ってリクエストの扱い方を + 決めることもできます。リライトエンジンは上で挙げられている三つのマッピング + すべてを行なうことができます: 内部のリダイレクト (エイリアス)、 + 外部のリダイレクト、プロキシです。mod_rewrite を使う多くの実用的な例は + <a href="misc/rewriteguide.html">URL リライトガイド</a> + で説明されています。</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="notfound" id="notfound">File Not Found</a></h2> + + <p>必ず、リクエストされた URL に対応するファイルがファイルシステムに + 無いという場合が発生します。これが起こるのにはいくつかの理由があります。 + 場合によっては、ドキュメントを別の場所に移動した結果であることがあります。 + この場合は、クライアントにリソースの新しい位置を知らせるために + <a href="#redirect">URL リダイレクション</a>を使うのが最善の方法です。 + そうすることによって、リソースは新しい位置に移動しているけれども、 + 古いブックマークやリンクが動作し続けるようにすることができます。</p> + + <p>"File Not Found" エラーのもう一つのよくある理由は、 + ブラウザへの直接入力や HTML リンクからの偶発的な URL の入力間違いです。 + Apache はこの問題を改善するために、<code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> + モジュール (意図的な綴り間違い) + (訳注: 正しくは spelling) を提供しています。このモジュールが + 使用されているときは、"File Not Found" エラーを横取りして、 + 似たファイル名のリソースを探します。もし一つだけ見つかった場合は + mod_speling はクライアントに正しい位置を知らせるために HTTP リダイレクトを + 送ります。もし複数の「近い」ファイルが見つかった場合は、それら + 代替となりえるもののリストがクライアントに表示されます。</p> + + <p>mod_speling の非常に有用な機能は、大文字小文字を区別せずに + ファイル名を比較するものです。これは URL と unix の + ファイルシステムが両方とも大文字小文字を区別するものである、 + ということをユーザが知らないシステムで役に立ちます。ただし、 + 時折の URL 訂正程度で済まず、mod_speling をより多く使用すると、サーバに + さらなる負荷がかかります。すべての「正しくない」リクエストの後に + URL のリダイレクトとクライアントからの新しいリクエストがくることに + なりますから。</p> + + <p>コンテンツの位置を決めようとするすべての試みが失敗すると、 + Apache は、HTTP ステータスコード 404 (file not found) と共に + エラーページを返します。このエラーページの外観は + <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> + ディレクティブで制御され、 + <a href="custom-error.html">カスタムエラーレスポンス</a> で + 説明されているように、柔軟な設定を行なうことができます。</p> +</div></div> +<div class="bottomlang"> +<p><span>翻訳済み言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/urlmapping.html.ko.euc-kr b/docs/manual/urlmapping.html.ko.euc-kr new file mode 100644 index 0000000..90e8b47 --- /dev/null +++ b/docs/manual/urlmapping.html.ko.euc-kr @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="EUC-KR"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head> +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>URL Ͻý ġ ϱ - Apache HTTP Server Version 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<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.4</a></div><div id="page-content"><div id="preamble"><h1>URL Ͻý ġ ϱ</h1> +<div class="toplang"> +<p><span> : </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate"> ֽ ƴմϴ. + ֱٿ ϼ.</div> + + <p> û URL ġ + Ͻýۻ ġ ã Ѵ.</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">õ þ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#outside">DocumentRoot ۿ ִ ϵ</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#user"> 丮</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#redirect">URL ̷(Redirection)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#proxy">Ͻ(Reverse Proxy)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#rewrite">ۼ (Rewriting Engine)</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li> +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="related" id="related">õ þ</a></h2> + +<table class="related"><tr><th>õ </th><th>õ þ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritematch">RewriteMatch</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="documentroot" id="documentroot">DocumentRoot</a></h2> + + <p>û ġ ϱ + ⺻ û URL-(URL ȣƮ Ʈ ڿ + κ) Ͽ <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> ڿ δ. + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> Ʒִ + ϰ 丮 Ե ⺻ ̴.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="outside" id="outside">DocumentRoot ۿ ִ ϵ</a></h2> + + <p> Ͻýۿ <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> Ʒ κ + ʿ䰡 ִ. ġ + ִ. н ýۿ ɺũ Ͽ + Ͻý ٸ κ <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> Ʒ ִ. + ġ ش 丮 <code class="directive"><a href="./mod/core.html#options">Options</a></code> + <code>FollowSymLinks</code> + <code>SymLinksIfOwnerMatch</code> ִ 쿡 ɺũ + .</p> + + <p>, <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> + þ Ͻý Ư κ Ѵ. + ٸ</p> + +<div class="example"><p><code>Alias /docs /var/web</code></p></div> + + <p>URL <code>http://www.example.com/docs/dir/file.html</code> + <code>/var/web/dir/file.html</code> Ѵ. + ο ִ CGI ũƮ ϴ + ϰ <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + þ Ѵ.</p> + + <p><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> + <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> + þ ǥı ġ Ͽ + ϴ. ,</p> + +<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) + /home/$1/cgi-bin/$2</code></p></div> + + <p> <code>http://example.com/~user/cgi-bin/script.cgi</code> + û <code>/home/user/cgi-bin/script.cgi</code> + ϰ, ش CGI ũƮ Ѵ.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="user" id="user"> 丮</a></h2> + + <p>н ý Ư <em>user</em> + Ȩ丮 <code>~user/</code> ĪѴ. + <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> + ȮϿ, URL Ȩ丮 + ȿ ִ Ѵ.</p> + +<div class="example"><p><code>http://www.example.com/~user/file.html</code></p></div> + + <p>Ȼ Ȩ丮 + ȵȴ. <code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code> + þ Ȩ丮 ϵ 丮 + Ѵ. ⺻ <code>Userdir public_html</code> ϰ + <code>/home/user/</code> <code>/etc/passwd</code> + Ȩ丮, URL + <code>/home/user/public_html/file.html</code> Ѵ.</p> + + <p>, <code>Userdir</code> þ <code>/etc/passwd</code> + Ȩ丮 ġ ʴ ý ٸ + ¸ ִ.</p> + + <p> ( <code>%7e</code> ڵǴ) + "~" ȣ ̻Ͽ ٸ 丮 Ÿ + ;Ѵ. mod_userdir ʴ´. + Ȩ丮 Ģ ִٸ, <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> þ Ͽ + ϴ ȿ ִ. , + <code>AliasMatch</code> þ ϸ + <code>http://www.example.com/upages/user/file.html</code> + <code>/home/user/public_html/file.html</code> Ѵ:</p> + +<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*) + /home/$1/public_html/$2</code></p></div> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="redirect" id="redirect">URL ̷(Redirection)</a></h2> + + <p>տ þ ġ Ͻý Ư + ҿ ִ Ŭ̾Ʈ . + û ٸ URL ִٰ Ŭ̾Ʈ ˷־, + Ŭ̾Ʈ URL ûϵ + ִ. ̸ <em>̷(redirection)</em>̶ ϸ, + <code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code> þ + Ѵ. , <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> Ʒ <code>/foo/</code> + 丮 <code>/bar/</code> 丮 Űٸ + Ŭ̾Ʈ ο ġ ûϵ Ѵ:</p> + +<div class="example"><p><code>Redirect permanent /foo/ + http://www.example.com/bar/</code></p></div> + + <p> <code>www.example.com</code> <code>/foo/</code> + ϴ URL-δ <code>/foo/</code> <code>/bar/</code> + ٲ URL ̷ǵȴ. Ŭ̾Ʈ ܿ + ٸ ε ̷ ִ.</p> + + <p>, ġ ۼ + <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> + þ Ѵ. , ٸ û ״ ΰ Ʈ + Ȩ û ٸ Ʈ ̷Ϸ:</p> + +<div class="example"><p><code>RedirectMatch permanent ^/$ + http://www.example.com/startpage.html</code></p></div> + + <p>ӽ÷ Ʈ ٸ Ʈ Ư + ̷Ϸ:</p> + +<div class="example"><p><code>RedirectMatch temp .* + http://othersite.example.com/startpage.html</code></p></div> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="proxy" id="proxy">Ͻ(Reverse Proxy)</a></h2> + +<p>ġ ٸ ִ URL + ִ. ͼ +Ŭ̾Ʈ ϴ Ͻ ϱ ̷ + <em>Ͻ(reverse proxying)</em> Ѵ. Ŭ̾Ʈ +忡 Ͻ ִ ó ̹Ƿ Ϲ +Ͻÿʹ ٸ.</p> + +<p>Ʒ Ŭ̾Ʈ <code>/foo/</code> ִ +ûϸ, <code>internal.example.com</code> +<code>/bar/</code> 丮 ͼ ġ + ־ ó Ŭ̾Ʈ .</p> + +<div class="example"><p><code> +ProxyPass /foo/ http://internal.example.com/bar/<br /> +ProxyPassReverse /foo/ http://internal.example.com/bar/ +</code></p></div> + +<p><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> + ϸ, <code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> þ +<code>internal.example.com</code> ̷ ۼϿ +̷ 丮 Ű Ѵ. +, <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> +<code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> + Ű ۼѴ.</p> +<p> ȿ ִ ũ ۼ ϶. +<code>internal.example.com</code> 븵ũ Ŭ̾Ʈ +Ͻü ƴ϶ <code>internal.example.com</code> +ûϰ Ѵ. ڰ <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a> + Ͽ HTML XHTML ִ ũ ۼ ִ.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="rewrite" id="rewrite">ۼ (Rewriting Engine)</a></h2> + + <p> ġȯ ʿҶ <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> + ۼ ȴ. þ + Ŭ̾Ʈ IP ּ û Ư¡ ִ + ִ. , mod_rewrite û + ó ϱ ܺ ͺ̽ ̳ + α ִ. ۼ ٷ + , , ̷ (alias), ܺ ̷, + Ͻ, θ Ѵ. mod_rewrite ϴ + <a href="misc/rewriteguide.html">URL ۼ ħ</a> + Ѵ.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="notfound" id="notfound">File Not Found</a></h2> + + <p>ᱹ û URL ϴ Ͻýۿ ã + ̴. ִ. + ٸ Ű ִ. Ŭ̾Ʈ + <a href="#redirect">URL ̷</a> ڿ ο + ġ ˷ִ . ڿ Űܵ + ϸũ ũ ȿϴ.</p> + + <p>"File Not Found" ٸ Ϲ + Ȥ HTML ũ URL ߸ Էµ ̴. ġ + <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> ( Ʋ ʾ) + ̿ ´. ϸ "File Not Found" + ϴ ϸ ڿ ã´. + ߰ϸ mod_speling Ŭ̾Ʈ ùٸ ġ + HTTP ̷Ѵ. "" ִٸ + Ŭ̾Ʈ .</p> + + <p>mod_speling Ư ҹڸ ʰ + ϸ ϴ ̴. н Ͻý۰ URL + ҹ ϴ ڰ ִ ýۿ + ȴ. mod_speling URL ľѴٸ, "߸" + û URL ̷ǰ Ŭ̾Ʈ ο û + ϾǷ δ ȴ.</p> + + <p>ã õ ϸ ġ HTTP status code 404 + (file not found) . + <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> þ + ϸ, <a href="custom-error.html"> </a> + Ͽ ִ.</p> +</div></div> +<div class="bottomlang"> +<p><span> : </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 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> +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/urlmapping.html.tr.utf8 b/docs/manual/urlmapping.html.tr.utf8 new file mode 100644 index 0000000..c0823a8 --- /dev/null +++ b/docs/manual/urlmapping.html.tr.utf8 @@ -0,0 +1,365 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>URL’lerin Dosya Sistemi ile Eşleştirilmesi - Apache HTTP Sunucusu Sürüm 2.4</title> +<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" /> +<script src="./style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="./images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p> +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p> +<img alt="" src="./images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Sunucusu</a> > <a href="http://httpd.apache.org/docs/">Belgeleme</a> > <a href="./">Sürüm 2.4</a></div><div id="page-content"><div id="preamble"><h1>URL’lerin Dosya Sistemi ile Eşleştirilmesi</h1> +<div class="toplang"> +<p><span>Mevcut Diller: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" title="Türkçe"> tr </a></p> +</div> + + <p>Bu belgede, bir istekte belirtilen URL’nin sunulacak dosyanın dosya + sistemindeki yerini bulmak için Apache HTTP Sunucusu tarafından nasıl + kullanıldığı açıklanmaktadır.</p> + </div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">İlgili Modüller ve Yönergeler</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#documentroot"><code>DocumentRoot</code></a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#outside">Belge Kök Dizini Dışındaki Dosyalar</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#user">Kullanıcı Dizinleri</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#redirect">URL Yönlendirme</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#proxy">Karşı Vekil</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#rewrite">Yeniden Yazma Motoru</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#notfound">Dosya orada yok</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#other">Diğer URL Eşleme Modülleri</a></li> +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorumlar</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="related" id="related">İlgili Modüller ve Yönergeler</a></h2> + +<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="documentroot" id="documentroot"><code>DocumentRoot</code></a></h2> + + <p>Yapılan bir isteğe hangi dosyanın sunulacağına karar verirken + httpd’nin öntanımlı davranışı istek için URL yolunu (URL’den konak ismi + ve port ayrıldıktan sonra kalan kısım) alıp bunu yapılandırma dosyasında + <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> yönergesi ile + belirtilen dizinin sonuna eklemektir. Bu nedenle, <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altındaki dizinler ve dosyalar + sitenin dışardan görünen temel belge ağacını oluştururlar.</p> + + <p>Örneğin, <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> yönergesine + <code>/var/http/html</code> atanmış olsun. + <code>http://example.com/balıklar/zargana.html</code> şeklindeki bir + istek için istemciye <code>/var/http/html/balıklar/zargana.html</code> + dosyası sunulur.</p> + + <p>Bir dizin istenirse (<code>/</code> ile biten bir yol belirtilmesi + durumu), sunulacak dosya <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> yönergesinde belirtilen dosya olacaktır. + Örneğin, <code>DocumentRoot</code> yukarıdaki gibi belirtimiş ve siz de + şunu belirtmişseniz:</p> + + <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div> + + <p><code>http://www.example.com/fish/</code> isteği, httpd'nin + <code>/var/www/html/fish/index.html</code> dosyasını sunmaya, bu dosya + bulunmuyorsa <code>/var/www/html/fish/index.php</code> dosyasını sunmaya + çalışmasına sebep olacaktır.</p> + + <p>Bu dosyaların ikisi de bulunmuyorsa sonraki adım, + <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> yüklü ve uygun şekilde yapılandırılmışsa + bir dizin içeriği dosyası sağlamaya çalışmak olacaktır.</p> + + <p>httpd ayrıca, sunucunun birden fazla konak için istek kabul etmesini + sağlayan <a href="vhosts/">sanal barındırmaya</a> da muktedirdir. Bu + durumda her sanal konak için ayrı bir <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> belirtilebileceği gibi sunulacak içeriğin + istekte bulunulan IP adresi veya konak ismine dayanarak devingen olarak + saptanmasını sağlayabilen <code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code> modülüyle + gelen yönergeler de kullanılabilir.</p> + + <p><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> yönergesi + yapılandırma dosyanızda ana sunucu için bir tane ve muhtemelen + oluşturduğunuz her <a href="vhosts/">sanal konak</a> için de birer + tanedir.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="outside" id="outside">Belge Kök Dizini Dışındaki Dosyalar</a></h2> + + <p>Bazen dosya sisteminde doğrudan <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altında bulunmayan dosyalara da erişim izni + vermek gerekir. httpd’de bunu sağlamanın çeşitli yolları vardır. Unix + sistemlerinde sembolik bağlar sayesinde dosya sisteminin farklı + yerlerindeki dosyaları ve dizinleri <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altındaymış gibi göstermek mümkündür. + <code class="directive"><a href="./mod/core.html#options">Options</a></code> yönergesine değer olarak + <code>FollowSymLinks</code> veya <code>SymLinksIfOwnerMatch</code> + atanmadıkça httpd olası güvenlik açıklarına karşı öntanımlı olarak + sembolik bağları izlemez.</p> + + <p>Bundan başka, dosya sisteminin farklı parçalarını belge kök dizini + altında göstermek için <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> + yönergesi de kullanılabilir. Örneğin,</p> + + <pre class="prettyprint lang-config">Alias "/belgeler" "/var/http"</pre> + + + <p>yapılandırması ile + <code>http://example.com/belgeler/dizin/dosya.html</code> URL’si için + dosya sistemindeki <code>/var/http/dizin/dosya.html</code> dosyası + sunulacaktır. Hedef dizindeki dosyaları birer <a class="glossarylink" href="./glossary.html#cgi" title="sözlüğe bakınız">CGI</a> betiği olarak imlemesi dışında <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> yönergesi de aynı şekilde + çalışır.</p> + + <p>Biraz daha fazla esnekliğin gerektiği durumlarda <a class="glossarylink" href="./glossary.html#regex" title="sözlüğe bakınız">düzenli ifadelere</a> dayalı eşleşmeler sağlamak + üzere <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> ve <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> yönergelerinin gücünden + yararlanılabilir. Örneğin,</p> + + <pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"</pre> + + + <p>satırı sayesinde <code>http://example.com/~user/cgi-bin/betik.cgi</code> + URL’si <code>/home/user/cgi-bin/betik.cgi</code> dosyası ile + eşleştirilir ve dosya bir CGI betiği olarak çalıştırılırdı.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="user" id="user">Kullanıcı Dizinleri</a></h2> + + <p>Geleneksel olarak Unix sistemlerinde belli bir kullanıcının (örn, + <em>birisi</em>) ev dizinine <code>~birisi/</code> şeklinde atıfta + bulunulabilir. <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> modülü bu özelliği site + üzerinden kullanıcıların ev dizinlerindeki dosyaları kişisel sayfalar + olarak sunmalarını sağlamak üzere kullanır. Örnek:</p> + + <div class="example"><p><code>http://example.com/~birisi/dosya.html</code></p></div> + + <p>Güvenlik sebebiyle kullanıcıların ev dizinlerine doğrudan HTTP erişimi + vermek uygun olmaz. Bu bakımdan, kullanıcının ev dizini altında HTTP + erişimi verilecek dosyaların bulunduğu dizini belirtmek için <code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code> yönergesi sağlanmıştır. + Öntanımlı olan <code>Userdir public_html</code> yapılandırması ile + yukarıdaki gibi bir URL kullanıcının ev dizini (<code>/etc/passwd</code> + dosyasında belirtilir) <code>/home/birisi/</code> altında yer alan + <code>/home/birisi/public_html/dosya.html</code> dosyası ile + eşleşirdi.</p> + + <p>Ev dizininin yerinin <code>/etc/passwd</code> dosyasında belirtilmediği + sistemlerde kullanılmak üzere <code>Userdir</code> yönergesinin başka + kullanım şekilleri de vardır.</p> + + <p>Bazı kişiler (genellikle URL üzerinde <code>%7e</code> olarak + kodlanması sebebiyle) "~" simgesini biçimsiz bulabilir ve kullanıcı + dizinlerini imlemek için başka bir karakter kullanmayı tercih + edebilirler. Bu işlevsellik <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> tarafından + desteklenmemektedir. Ancak, kullanıcı dizinleri düzgün şekilde + yapılandırılmışsa istenen etki <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> yönergesi ile sağlanabilir. + Örneğin, <code>http://example.com/sayfalar/birisi/dosya.html</code> + URL’si ile <code>/home/birisi/public_html/dosya.html</code> dosyasını + eşlemek için <code>AliasMatch</code> yönergesi şöyle + kullanılabilirdi:</p> + + <pre class="prettyprint lang-config">AliasMatch "^/sayfalar/([a-zA-Z0-9]+)(/(.*))?$" "/home/$1/public_html/$3"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="redirect" id="redirect">URL Yönlendirme</a></h2> + + <p>Yukarıdaki bölümlerde açıklanan yapılandırma yönergeleri httpd’ye + içeriği dosya sisteminin belli bir yerinden alıp istemciye göndermesini + söyler. Bazen istemciye, istediği içeriğe farklı bir URL ile + erişebileceğini ve bu URL için ayrı bir istek yapması gerektiğini + bildirmek gerekir. Bu işleme <em>yönlendirme</em> adı verilir ve bu + işlevsellik <code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code> yönergesi + ile sağlanır. Örneğin, <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> + altındaki <code>/foo/</code> dizininin içeriğinin <code>/bar/</code> + adında yeni bir dizine taşınması halinde istemciye yeni konumun + bildirilmesi şöyle sağlanabilirdi:</p> + + <pre class="prettyprint lang-config">Redirect permanent "/foo/" "http://example.com/bar/"</pre> + + + <p>Bu atama sayesinde <code>/foo/</code> ile başlayan URL yolları + <code>example.com</code> sunucundaki <code>/bar/</code> dizini altındaki + içeriğe yönlendirilmektedir. Yönlendirmeyi aynı sunucu üzerinde yapmak + zorunda değilsiniz, bu yönerge ile başka bir sunucuya da yönlendirme + yapabilirsiniz.</p> + + <p>httpd ayrıca, yeniden yazma ile ilgili daha karmaşık sorunlara çözüm + olarak <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> diye bir + yönerge daha sağlar. Örneğin bir sitenin baş sayfasını diğer isteklerden + ayrı olarak farklı bir siteye yönlendirmek için yönergeyi şöyle + kullanabilirsiniz:</p> + + <pre class="prettyprint lang-config">RedirectMatch permanent "^/$" "http://example.com/ilksayfa.html"</pre> + + + <p>Bundan başka, bir sitedeki tüm sayfalara yapılan istekleri başka bir + siteye geçici olarak yönlendirmek için şöyle bir şey yapabilirsiniz:</p> + + <pre class="prettyprint lang-config">RedirectMatch temp ".*" "http://mesela.example.com/ilksayfa.html"</pre> + +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="proxy" id="proxy">Karşı Vekil</a></h2> + + <p>httpd ayrıca, uzak sunuculardaki belgelerin yerel sunucunun URL + alanına getirilmesini de mümkün kılar. Bu tekniğe HTTP sunucunun + belgeleri uzak bir sunucudan alıp istemciye sunmasını sağlayarak bir + vekil sunucu gibi davranması nedeniyle <em>ters vekalet</em> adı + verilir. Belgelerin istemciye özkaynağın bulunduğu sunucudan + geliyormuş gibi değilde doğrudan isteği yaptığı sunucudan geliyormuş + gibi sunulması nedeniyle bu işlem normal vekaletten farklıdır.</p> + + <p>Aşağıdaki örnekte, istemci <code>/foo/</code> dizini altından bir belge + istemekte, sunucu ise bu belgeyi <code>dahili.example.com</code> + üzerindeki <code>/bar/</code> dizininden alıp istemciye yerel sunucudan + geliyormuş gibi sunmaktadır:</p> + + <pre class="prettyprint lang-config">ProxyPass "/foo/" "http://dahili.example.com/bar/" +ProxyPassReverse "/foo/" "http://dahili.example.com/bar/" +ProxyPassReverseCookieDomain dahili.example.com harici.example.com +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre> + + + <p><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> sunucuyu uygun + belgeleri alması için yapılandırırken <code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> yönergesi <code>dahili.example.com</code> + sunucusundan kaynaklanan yönlendirmeleri yeniden yazar, böylece bunların + yerel sunucudaki yerleri belirlenmiş olur. Benzer şekilde, <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> ve + <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code> + yönergeleri de arka sunucu tarafından atanan çerezleri yeniden yazar.</p> + + <p>Yalnız, belgelerin içindeki hiperbağların yeniden yazılmayacağına + dikkat ediniz. Dolayısıyla, belge içinde + <code>dahili.example.com</code>’u ismiyle hedef alan mutlak hiperbağlar + varsa bunlar istemci tarafından vekil sunucudan değil doğrudan + <code>dahili.example.com</code>’dan istenecektir. Bir sayfanın içindeki bu + bağları (ve diğer içeriği) <code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code> modülü + kullanılarak istemciye sunuluyormuşçasına değiştirebilirsiniz.</p> + + <pre class="prettyprint lang-config">Substitute "s/dahili\.example\.com/harici.example.com/i"</pre> + + + <p>HTML ve XHTML’de hiperbağları daha bilgece yeniden yazabilen + <code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> modülü de kullanılabilir. Yeniden + yazılması gereken URL eşlemlerini oluşturmanızı sağlar, böylece karmaşık + vekil senaryoları oluşturulabilir.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="rewrite" id="rewrite">Yeniden Yazma Motoru</a></h2> + + <p>Daha güçlü ikameler gerektiğinde <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> modülü + tarafından sağlanan yeniden yazma motoru işe yarayabilir. Bu modüldeki + yönergeler sunulacak içeriğin yerine karar vermek için kaynak IP adresi, + tarayıcı türü gibi isteğe özgü özellikleri kullanırlar. + <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> modülü buna ek olarak isteğin nasıl ele + alınacağına karar vermek için harici yazılımları ve veritabanlarını + kullanabilir. Yeniden yazma motoru yukarıda değinilen üç eşleşme türünü + de uygulayabilecek yetenektedir: Dahili yönlendirmeler (rumuzlar), + harici yönlendirmeler ve vekalet. <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> modülü + tarafından sağlanan yeteneklerin ayrıntılı açıklamaları ve bunların + kullanım örnekleri ayrıntılı olarak <a href="rewrite/">mod_rewrite + belgeleri</a>nde bulunmaktadır.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="notfound" id="notfound">Dosya orada yok</a></h2> + + <p>Kaçınılmaz olarak, dosya sisteminde mevcut olmayan dosyalar için de + istek yapılacaktır. Bunun çeşitli sebepleri olabilir. Bazı durumlarda + bu, belgelerin yerlerininin değiştirilmesinin bir sonucu olabilir. Bu + durumda yapılacak en iyi şey, istemciyi belgeyi yeni yerinden istemesi + için bilgilendirmek amacıyla <a href="#redirect">URL yönlendirmesi</a> + kullanmaktır. Bu şekilde, içeriğin yeri değişse bile eski yer imlerinin + ve hiperbağların çalışmaya devam edeceklerinden emin olabilirsiniz.</p> + + <p>"Dosya orada yok" ("File Not Found") hatalarının diğer bir bildik + sebebi de URL’lerin hiperbağlarda veya doğrudan tarayıcıda kasıtlı ya da + kasıtsız, yanlış yazılmasıdır. Bu tür sorunlarda yardımcı olması için + httpd <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> (sic) adında bir modülle gelir. Bu + modül etkin kılındığında htpd, "Dosya orada yok" ("File Not Found") + hatalarının önünü kesip başka bir yerde benzer isimde bir dosya var mı + diye bakar. Böyle bir dosya varsa, <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> + istemciye dosyanın doğru yerini bildiren bir HTTP yönlendirmesi yollar. + Benzer çok sayıda dosya varsa bunlar istemciye bir liste halinde + sunulur.</p> + + <p><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> modülünün en yararlı özelliklerinden biri + de dosya isimlerini harf büyüklüğüne duyarsız olarak arayabilmesidir. + Dosya isimlerinde harf büyüklüğünün önemli olduğu Unix benzeri sistemler + hakkında bilgisi olmayan kullanıcılara sahip sistemlerin kullanıcılarına + bu büyük yarar sağlar. Fakat modülün URL düzeltmekten başka şeyler için + de kullanılması, istemcilerden gelen neredeyse her isteğin URL + yönlendirmesine konu olmasına sebep olarak sunucunun yükünü + arttırabilir.</p> + + <p><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> modülü sanal URI'leri, onları sunan gerçek + kaynağa eşlemekte kullanılan <code class="directive"><a href="./mod/mod_dir.html#fallbackresource">FallbackResource</a></code> yönergesini içerir. Bir 'ön denetleyici' + gerçeklerken <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> modülünün kullanılmasını + sağlamak için çok kullanışlıdır.</p> + + <p>Yerinde bulunmayan içeriğin bulunması çabalarının tümü Apache’nin 404 + (Dosya orada yok) HTTP durum kodlu bir hata sayfası döndürmesine yol + açar. Bu sayfanın içeriği <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> yönergesi ile denetlenebilir ve <a href="custom-error.html">Hata Yanıtlarının Kişiselleştirilmesi</a> + bölümünde anlatıldığı gibi oldukça esnek bir şekilde + kişiselleştirilebilir.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> +<div class="section"> +<h2><a name="other" id="other">Diğer URL Eşleme Modülleri</a></h2> + + + + <p>URL eşlemede kullanılabilecek diğer modüller:</p> + + <ul> + <li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code> - Bir isteği, özkaynağın MIME türüne veya + istek yöntemine bakarak bir CGI betiğine eşler.</li> + + <li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> - URL'yi sonlandıran bölü çizgisini + <code>index.html</code> bir dosyaya eşler.</li> + + <li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code> - Bir isteği, bir HTML belge içindeki + bir resme yapılan kullanıcı tıklamalarına dayanarak bir URL'ye + eşler.</li> + + <li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> - Dil veya içerik sıkıştırması gibi + kullanıcı tercihlerine dayanarak uygun bir belgeyi seçer.</li> + </ul> + +</div></div> +<div class="bottomlang"> +<p><span>Mevcut Diller: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="./tr/urlmapping.html" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorumlar</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p> +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file |