Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E01217B18 for ; Fri, 13 Mar 2015 23:16:22 +0000 (UTC) Received: (qmail 80330 invoked by uid 500); 13 Mar 2015 23:16:19 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 80294 invoked by uid 500); 13 Mar 2015 23:16:18 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 80284 invoked by uid 99); 13 Mar 2015 23:16:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 23:16:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of from.isengard@gmail.com designates 74.125.82.169 as permitted sender) Received: from [74.125.82.169] (HELO mail-we0-f169.google.com) (74.125.82.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 23:16:13 +0000 Received: by wegp1 with SMTP id p1so1094557weg.1 for ; Fri, 13 Mar 2015 16:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=ykZv9EfRBGXePNZJKrdtRW1inwmsL6nyFHz3O8iRNJw=; b=DL6Snl7bDPYMgIyNQZkJXGs2tRM8jbK9sNz8lk39sgyR5deHs1aUFwjX8c9BNVjHyK NGauYaTSsTmjFM/8EeV7xuspf2d70nY/zz6tqAV/dhJ1vCTKQEhbsJ1ccQFgYhX6QElp ONRaRYztMxBTaSrcHYRssansEUwRTaGM01HFGmE5hfS3/rVTELbnm52HPsJAB6TnEi/0 TodTFQ28pkCc76HE15UPoxHz6w50CxHNwdg1aEnufTJtWgl6iGLjYIyWT7w7/mw4k+c5 HXaV8CuBPToTfKimVxtPl15GIF1mtoBKUuNmiPizYWRsexzgTrr2Gm2BQfeP+EVdkaL5 Jc0g== X-Received: by 10.180.105.40 with SMTP id gj8mr147272511wib.67.1426288507710; Fri, 13 Mar 2015 16:15:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.107.105 with HTTP; Fri, 13 Mar 2015 16:14:47 -0700 (PDT) From: Isengard Date: Fri, 13 Mar 2015 20:14:47 -0300 Message-ID: To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=f46d04428d16d97319051133ab2c X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Help on RewriteMap + RewriteCond - partial match --f46d04428d16d97319051133ab2c Content-Type: text/plain; charset=UTF-8 Hi, please some help on RewriteMap + RewriteCond. I want RewriteCond to match only request's that start with a text from rewriteMap file. I did this but it only works as an exactly match. RewriteMap robots_page txt:/etc/robots_page.txt RewriteCond ${robots_page:%{REQUEST_URI}|NOT_FOUND} !=NOT_FOUND robots_page.txt contents: /rest-api/ - /rest-apiv2/ - /rest-apiv3/ - For instance, I want to match requests like: /rest-api/customer/1 /rest-api/invoice/2 /rest-api/customer/list /rest-apiv2/invoice/98 /rest-apiv3/invoice/list Thanks! --f46d04428d16d97319051133ab2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi,=C2=A0
please some help o= n RewriteMap + RewriteCond.

I want RewriteCond to = match only request's that start with a text from rewriteMap file.
=

I did this but it only works as an exactly match.
=
RewriteMap =C2=A0 =C2=A0 =C2=A0robots_page =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 txt:/etc/robots_page.txt
RewriteCond =C2=A0 = =C2=A0 ${robots_page:%{REQUEST_URI}|NOT_FOUND} !=3DNOT_FOUND

=
robots_page.txt contents:
/rest-api/ -
/rest= -apiv2/ -
/rest-apiv3/ -

For ins= tance, I want to match requests like:
/rest-api/customer/1
<= div>/rest-api/invoice/2
/rest-api/customer/list
/rest-a= piv2/invoice/98
/rest-apiv3/invoice/list

Thanks!




--f46d04428d16d97319051133ab2c--