]> granicus.if.org Git - apache/commitdiff
Resolves comment about how regex matches, at
authorRich Bowen <rbowen@apache.org>
Tue, 2 Feb 2016 11:11:33 +0000 (11:11 +0000)
committerRich Bowen <rbowen@apache.org>
Tue, 2 Feb 2016 11:11:33 +0000 (11:11 +0000)
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#comments_thread

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1728084 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.xml

index 2dd66a99b7f6a5a2f4cfff49bf1c17546ae661e7..107a0f2bd5ce3a32a227a591583d9fe74719547f 100644 (file)
@@ -570,7 +570,6 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3"
                 respectively.</p>
 
                 <p>Those that are special to mod_rewrite include those below.</p>
-        <note>
                 <dl>
                   <dt><code>API_VERSION</code></dt>
 
@@ -644,7 +643,6 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3"
                   (decoded), unlike most other variables below.</dd>
 
                 </dl>
-</note>
         </li>
       </ul>
 
@@ -1062,6 +1060,13 @@ RewriteRule  "^/$"                 "/homepage.std.html"  [L]
       <code>%{HTTP_HOST}</code>, <code>%{SERVER_PORT}</code>, or
       <code>%{QUERY_STRING}</code> variables respectively.</p>
 
+      <p>In any case, remember that regular expressions are substring
+      matches. That is, you don't need the regex to describe the entire
+      string, just the part that you wish to match. Thus, using a regex
+      of <code>.</code> is often sufficient rather than <code>.*</code>,
+      and the regex <code>abc</code> is <strong>not</code> the same as
+      <code>^abc$</code>.</p>
+
 </note>
 
 <note><title>Per-directory Rewrites</title>