I am trying to authenticate access to everything in webroot (/) except anything that resides in a particular directory (/directory/) and I've tried both of these options to no avail:
$HTTP["url"] =~ "^(?!(/directory))" {
auth.require = ( "" =>
(
"method" => "basic",
"realm" => "auth to this area",
"require" => "user=username"
)
)
}
$HTTP["url"] != "/directory" {
auth.require = ( "" =>
(
"method" => "basic",
"realm" => "auth to this area",
"require" => "user=username"
)
)
}