Current Path : /usr/local/apache22/share/doc/apache2/rewrite/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/apache22/share/doc/apache2/rewrite/index.html.zh-cn.utf8 |
<?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="zh-cn" xml:lang="zh-cn"><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>Apache mod_rewrite - Apache HTTP 服务器 版本 2.2</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" /><link href="http://httpd.apache.org/docs/current/rewrite/index.html" rel="canonical" /></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">常见问题</a> | <a href="../glossary.html">术语</a> | <a href="../sitemap.html">网站导航</a></p> <p class="apache">Apache HTTP 服务器版本 2.2</p> <img alt="" src="../images/feather.gif" /></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.2</a></div><div id="page-content"><div class="retired"><h4>Please note</h4> <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p> <p>You may follow <a href="http://httpd.apache.org/docs/current/rewrite/">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache mod_rewrite</h1> <div class="toplang"> <p><span>可用语言: </span><a href="../en/rewrite/" hreflang="en" rel="alternate" title="English"> en </a> | <a href="../fr/rewrite/" hreflang="fr" rel="alternate" title="Français"> fr </a> | <a href="../tr/rewrite/" hreflang="tr" rel="alternate" title="Türkçe"> tr </a> | <a href="../zh-cn/rewrite/" title="Simplified Chinese"> zh-cn </a></p> </div> <div class="outofdate">此翻译可能过期。要了解最近的更改,请阅读英文版。</div> <p><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> 提供了基于<a href="intro.html#regex">正则表达式</a>规则动态修改传入的请求的 URL 的方法。 这允许你以自己喜欢的任意方法映射任意 URL 到你的内部 URL 结构。</p> <p>它支持无限的规则,以及为每个规则附加条件,从而提供了一个真正灵活且强大的 URL 操作机制。URL 操作可以依赖于各种测试,例如服务器变量,环境变量,HTTP 头,时戳,甚至外部数据库查询等,以便完成 URL 单元匹配。</p> <p>这个模块在服务器上下文 (<code>httpd.conf</code>),虚拟主机上下文 (<code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> 指令块),目录上下文 (<code>.htaccess</code> 文件和 <code><Directory></code> 指令块) 对完整的 URL (包含目录信息部分和查询字符串部分) 操作。 重写结果可以导致新的规则处理,内部的后续处理,外部请求重定向,甚至透过内部代理, 这取决于你为规则附加的<a href="flags.html">标志</a>。</p> <p>既然 mod_rewrite 这么强大,它当然是相当复杂。这篇文档作为<a href="../mod/mod_rewrite.html">参考手册</a>的补充,试图减轻一些复杂性, 提供你可能使用 mod_rewrite 的常见场景的有充分注释的例子。 但是,我们也试图告诉你,在什么时候你不应当使用 mod_rewrite, 可以使用其它标准的 Apache 特性来达到目的,以避免无谓的复杂性。</p> <ul> <li><a href="../mod/mod_rewrite.html">mod_rewrite 参考手册</a></li> <li><a href="intro.html">正则表达式与 mod_rewrite 入门</a></li> <li><a href="remapping.html">使用 mod_rewrite 重定向和重新映射 URL</a></li> <li><a href="access.html">使用 mod_rewrite 控制访问</a></li> <li><a href="vhosts.html">动态虚拟主机与 mod_rewrite</a></li> <li><a href="proxy.html">动态代理与 mod_rewrite</a></li> <li><a href="rewritemap.html">使用 RewriteMap</a></li> <li><a href="advanced.html">高级技术与诀窍</a></li> <li><a href="avoid.html">何时 <strong>不要</strong>使用 mod_rewrite</a></li> <li><a href="flags.html">RewriteRule 标志</a></li> <li><a href="tech.html">技术细节</a></li> </ul> </div> <div id="quickview"><h3>参见</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">mod_rewrite 参考手册</a></li><li><a href="../urlmapping.html">从 URL 映射到文件系统</a></li><li><a href="http://wiki.apache.org/httpd/Rewrite">mod_rewrite wiki</a></li><li><a href="../glossary.html">术语</a></li></ul></div> </div> <div class="bottomlang"> <p><span>可用语言: </span><a href="../en/rewrite/" hreflang="en" rel="alternate" title="English"> en </a> | <a href="../fr/rewrite/" hreflang="fr" rel="alternate" title="Français"> fr </a> | <a href="../tr/rewrite/" hreflang="tr" rel="alternate" title="Türkçe"> tr </a> | <a href="../zh-cn/rewrite/" title="Simplified Chinese"> zh-cn </a></p> </div><div id="footer"> <p class="apache">Copyright 2017 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">常见问题</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>