On 9/27/19 10:30 AM, Jack Simmons wrote: > Good day everyone! I've got a question related to Basic Authorization and Home directory detection. Namely, I want to configure the webserver in such a way that it allows to do autoindex if user is browsing their home directory. I tried to declare an environment variable first, but then realized that I am unable to use it inside If directive. > > For example: > > SetEnvIf Request_URI ^/(.*)/ URI_HOME=$1 > SetEnvIf Authorization "^Basic (.*)$" X_HTTP_AUTHORIZATION=$1 > SetEnvIfExpr "unbase64(%{ENV:X_HTTP_AUTHORIZATION}) -strcmatch '%{ENV:URI_HOME}:*'" USER_IS_IN_HOME_DIR > > Then it tried to put the extraction of username info If clause. But I cannot figure out how to use regexp inside it or some substring function to remove "Basic " prefix. > I have seen how it is done on wiki page: > https://cwiki.apache.org/confluence/display/httpd/LogBasicauthenticationusername > But again, RequestHeader runs after any If directove so I am unable to configure Autoindex for my purposes. > Any ideas how it can be done? > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > https://httpd.apache.org/docs/2.4/env.html -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx