Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 10280 invoked from network); 14 Jan 2011 16:21:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jan 2011 16:21:42 -0000 Received: (qmail 76225 invoked by uid 500); 14 Jan 2011 16:21:42 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 75948 invoked by uid 500); 14 Jan 2011 16:21:39 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 75935 invoked by uid 99); 14 Jan 2011 16:21:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 16:21:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 16:21:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 490D023888FD; Fri, 14 Jan 2011 16:21:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1059058 - /httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Date: Fri, 14 Jan 2011 16:21:10 -0000 To: cvs@httpd.apache.org From: rbowen@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110114162110.490D023888FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rbowen Date: Fri Jan 14 16:21:09 2011 New Revision: 1059058 URL: http://svn.apache.org/viewvc?rev=1059058&view=rev Log: Provides an example of using expr in a RewriteCond for a commonly-requested recipe. Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml?rev=1059058&r1=1059057&r2=1059058&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Fri Jan 14 16:21:09 2011 @@ -775,6 +775,17 @@ RewriteRule ^index\.html$ newsite.html

If the TestString has the special value expr, the CondPattern will be treated as a ap_expr.

+ +

+ In the below example, -strmatch is used to + compare the REFERER against the site hostname, + to block unwanted hotlinking. +

+ + + RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
+ RewriteRule ^/images - [F] +
  • You can also set special flags for