Score:0

Apache Filesmatch regex issue

ye flag

I'm trying to block all files that contains the keyword cpf

and I've entered this into the apache2 configuration:

<FilesMatch "cpf.*$">
    Require all denied
</FilesMatch>

and this blocked a file called name.cpf, but not name.cpfs and name.cpfs.bak

me and regex isn't compatible..

and if possible, throw a 404 not found instead of access denied?

jp flag
I don't see anything wrong with the regex. For 404 see this answer https://serverfault.com/a/1020454/23022
ye flag
@AlexD me either, but if I'm entering name.cpfs the server will send me the file...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.