]> granicus.if.org Git - apache/commitdiff
xforms
authorEric Covener <covener@apache.org>
Sat, 6 Dec 2014 14:15:18 +0000 (14:15 +0000)
committerEric Covener <covener@apache.org>
Sat, 6 Dec 2014 14:15:18 +0000 (14:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1643534 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_log_config.xml.ja
docs/manual/mod/mod_log_config.xml.ko
docs/manual/mod/mod_log_config.xml.meta
docs/manual/rewrite/remapping.html.en

index 7d391575499e5509789babb3e599d72fc39e7d89..469bb17a90eba4fc6f9d0d4ff8aac5b9794767e0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 579425:1619884 (outdated) -->
+<!-- English Revision: 579425:1584684 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 23c617f6879ded2c052e989ce2ffa98292116cde..47be0f425062edb838e269f97e047b03f9436572 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="EUC-KR" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1619884 (outdated) -->
+<!-- English Revision: 105989:1584684 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index d4b2d270f9b201ed18312951d4a81503cc7d578b..d3f68096ba3c77b6ba107f4856e955d93c450ce7 100644 (file)
@@ -11,6 +11,6 @@
     <variant>fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
-    <variant>tr</variant>
+    <variant outdated="yes">tr</variant>
   </variants>
 </metafile>
index be9e4cc24d985c03222c1e395a8f8fa03a45d6b1..be8ed353eb997fa2bcd7d2d8bd32866ea817e1a5 100644 (file)
@@ -50,6 +50,7 @@ configuration.</div>
 <li><img alt="" src="../images/down.gif" /> <a href="#canonicalurl">Canonical URLs</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#moveddocroot">Moved <code>DocumentRoot</code></a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#fallback-resource">Fallback Resource</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#rewrite-query">Rewrite query string</a></li>
 </ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a href="access.html">Controlling access</a></li><li><a href="vhosts.html">Virtual hosts</a></li><li><a href="proxy.html">Proxying</a></li><li><a href="rewritemap.html">Using RewriteMap</a></li><li><a href="advanced.html">Advanced techniques</a></li><li><a href="avoid.html">When not to use mod_rewrite</a></li></ul><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">
@@ -606,6 +607,63 @@ file, as well as in a &lt;Directory&gt; block.</p>
 
 </dl>
 
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="rewrite-query" id="rewrite-query">Rewrite query string</a></h2>
+
+
+<dl>
+<dt>Description:</dt>
+<dd>You want to capture a particular value from a query string
+and either replace it or incorporate it into another component
+of the URL.</dd>
+
+<dt>Solutions:</dt>
+<dd>
+<p> Many of the solutions in this section will all use the same condition,
+which leaves the matched value in the %2 backreference.  %1 is the beginining
+of the query string (up to the key of intererest), and %3 is the remainder. This
+condition is a bit complex for flexibility and to avoid double '&amp;&amp;' in the 
+substitutions.</p>
+<ul>
+  <li>This solution removes the matching key and value:
+
+<pre class="prettyprint lang-config"># Remove mykey=???
+RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
+RewriteRule (.*) $1?%1%3</pre>
+
+  </li>
+
+  <li>This solution uses the captured value in the URL subsitution,
+  discarding the rest of the original query by appending a '?':
+
+<pre class="prettyprint lang-config"># Copy from query string to PATH_INFO
+RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
+RewriteRule (.*) $1/products/%2/? [PT]</pre>
+
+  </li>
+
+  <li>This solution checks the captured value in a subsequent condition:
+
+<pre class="prettyprint lang-config"># Capture the value of mykey in the query string
+RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
+RewriteCond %2 !=not-so-secret-value 
+RewriteRule (.*) - [F]</pre>
+
+  </li>
+
+  <li>This solution shows the reverse of the previous ones, copying
+      path components (perhaps PATH_INFO) from the URL into the query string.
+<pre class="prettyprint lang-config"># The desired URL might be /products/kitchen-sink, and the script expects 
+# /path?products=kitchen-sink.
+RewriteRule ^/?path/([^/]+)/([^/]+) /path?$1=$2 [PT]</pre>
+
+  </li>
+</ul>
+
+</dd>
+
+</dl>
 </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/remapping.html" title="English">&nbsp;en&nbsp;</a> |