Re: SetEnvIf and exceptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 4/11/23 8:59 PM, Tatsuki Makino wrote:
Dave Wreski wrote on 2023/04/12 01:39:
In case I wasn't clear, simply removing the caret was not enough to make this work. The "Require env SOMENAME2" was enough to begin blocking every page on the site with a 403, not just the RSS feeds or the bots, but every legitimate request.

I'm going to do more research on RequireAll, but isn't that essentially saying AND? Require all AND Require not env SOMENAME1 AND Require env SOMENAME2? How can that ever match?

I suppose that also means it wouldn't be RequireAny because it would always match the Require all.
The purpose of this is to include related keywords, and I wrote it without understanding the logic required for actual operation.
There might be a funny reversal going on somewhere.

Is this correct? :)

<RequireAny>
  <RequireAll>
    Require all granted
    Require not env IS_BOT
  </RequireAll>
  Require env IS_RSS
</RequireAny>

Yes, that's correct :-)

I also simultaneously came to this outcome, but had a single errant " character that affected the entire htaccess file, resulting in accesses being rejected, yikes. Once I realized that, it started to work.

One other question - is there an order of processing the .htaccess in the document root and the virtual host config? Are they both processed together, or does one take precedence over the other?

Thanks so much for all of your help.

dave






[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux