httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Gabriel Duquesnoy" <>
Subject Syntax for <FilesMatch> directive
Date Thu, 13 Dec 2001 17:22:45 GMT

I need some information about the regular expression syntax for a
directive. I need to enable authentication for specific files within a
and though the <FilesMatch> directive would be the right one, but I have
several expressions to match my expectations, and none has given the
results. The files I want to protect have the following naming convention:
add*.php, amend*.php and del*.php
I have tried with:
<FilesMatch "(add|amend|del)*.php $">
	AuthType Basic
	AuthName "Authentication Required"
	AuthUserFile /usr/local/apache/passwd/passwords
	Require valid-user

But the files are still accessible without the user being asked for
I have managed to set it up for a directory, so I know it works, but I have
an error or mistake in my expression "(add|amend|del)*.php $".
Could anyone help me out there or tell me where I can find explanation about
syntax of that piece.

Many thanx in advance.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message