Score:0

How does this RewriteRule allow certain to access a file in a protected folder?

cn flag

I'm trying to understand how this RewriteRule code works:

RewriteRule private/([a-zA-Z0-9]+)$ index.php?bua_v2_pf=$1 [L]
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule content/images/protected(\/[A-Za-z0-9_@.\/&+-]+)+\.([A-Za-z0-9_@.\/&+-]+)$ index.php?bua_v2_pf=$1&direct_access=true&file_type=$2 [QSA,L]

It blocks access to the protected directory but allows certain users to access the files. Does anyone have an explanation?

in flag
Well, it doesn't. At least not by itself. There must be more related to it in the rest of the configuration. Or the logic is inside the index.php.
cn flag
I understand. Then it may be passing a query string to the file.
Gerard H. Pille avatar
in flag
It IS passing a query string to index.php, more precisely bua_v2_pf=$1, where $1 is a string of letters and digits following "private/".
cn flag
Thank you Gerard.
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.