httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isengard <from.iseng...@gmail.com>
Subject [users@httpd] Help on RewriteMap + RewriteCond - partial match
Date Fri, 13 Mar 2015 23:14:47 GMT
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!

Mime
View raw message