<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">Cette traduction peut être périmée. Vérifiez la version
- anglaise pour les changements récents.</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
<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>
-<div class="example"><p><code>Alias /docs /var/web</code></p></div>
+<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
sur les <a class="glossarylink" href="./glossary.html#regex" title="voir glossaire">expressions rationnelles</a>.
Par exemple,</p>
-<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
- /home/$1/cgi-bin/$2</code></p></div>
+<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/public_html/file.html</code>, utilisez la directive
<code>AliasMatch</code> suivante :</p>
-<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
- /home/$1/public_html/$3</code></p></div>
+<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>
nouveau répertoire <code>/bar/</code>, vous pouvez demander aux clients
de le requérir à sa nouvelle localisation comme suit :</p>
-<div class="example"><p><code>Redirect permanent /foo/ http://www.example.com/bar/</code></p></div>
+<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
laisser toutes les autres requêtes inchangées, utilisez la
configuration suivante :</p>
-<div class="example"><p><code>RedirectMatch permanent ^/$
- http://www.example.com/startpage.html</code></p></div>
+<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>
-<div class="example"><p><code>RedirectMatch temp .*
- http://othersite.example.com/startpage.html</code></p></div>
+<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>
<code>/bar/</code> sur <code>internal.example.com</code>
et les renvoie au client comme s'ils appartenaient au serveur local.</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
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>
+</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
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>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
Substitute s/internal\.example\.com/www.example.com/i
-</code></p></div>
+</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
<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>This section is experimental!</strong><br />Comments placed here should not be expected
-to last beyond the testing phase of this system, nor do we in any way guarantee that we'll read them.</div>
+</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 again 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 Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
-var lang = 'fr';
-var disqus_shortname = 'httpd';
-var disqus_identifier = window.location.href.replace(/(current|trunk)/, "2.4").replace(/\/[a-z]{2}\//, "/").replace(window.location.protocol, "http:") + '.' + lang;
-if (disqus_identifier.indexOf("httpd.apache.org") == -1) {
- document.write('<div id="disqus_thread">\n</div>');
- (function() {
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = window.location.protocol + '//' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
-} else {
- document.write("Comments have been disabled for offline viewing.");
-}
+var comments_shortname = 'httpd';
+var comments_identifier = 'http://httpd.apache.org/docs/trunk/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 2012 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) {
+if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();
}
//--><!]]></script>