You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Isengard <fr...@gmail.com> on 2015/03/14 00:14:47 UTC
[users@httpd] Help on RewriteMap + RewriteCond - partial match
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!