<LocationMatch> directive

Description: Applies the enclosed directives only to regular-expression matching URLs
Syntax: <LocationMatch regex> ... </LocationMatch>
Context: server config, virtual host

 

This directive is exactly the same as <Location ~> regular expression syntax.

Example:

<LocationMatch "/(home|section)/bin">

   # ... rules go here

</LocationMatch>


Don't forget to include RewriteEngine on directive in every <VirtualHost> tag or enclosed rules will not be applied.