Score:0

RewriteMap not working as expected

cn flag
Sam

I am trying to block access to certain url :

https://example.com/questions/topic

I have a blacklist.txt file that contains the following :

questions/topic deny

and then I have the following in the configuration :

 RewriteMap access txt:path_to_blacklist.txt
 RewriteCond ${access:%{REQUEST_URI}} deny [NC]
 RewriteRule .* - [F,L]

but I found that I still can open https://example.com/questions/topic normally but when I tried to use the below configuration instead of RewriteMap :

RewriteCond %{REQUEST_URI} questions/topic  [NC]
RewriteRule .* - [F,L]

it worked successfully and I wasnt able to access the url. so how can I achieve the same result with RewriteMap ?

cn flag
Sam
can anyone help me with that ??
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.