I am working with openlitespeed and have for my php application a virtual location "/backend/" which I like to have password protected. I also using "rewrite" rules at the root context so the requests get routed to my "/index.php". I noticed when I have a root context "/" with rewrite rules the "Realm" protected context "/backend/" get ignored, regardless which order I have specified in in my virtual host. Any luck to get this working?
- context "Static" with URI "/" and rewriting rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
- context "Static" with URI "/backend" with "realm" and inherited rewriting rules
- realm get ignored
- it works if the directory "backend" on the file system exists, but then my rewriting will not work
- context "LiteSpeed SAPI" with "backend" and "realm" but is not asking for the password.
I tried to switch the contexts in other order, but the effect is still the same. And yes I have restarted litespeed after the changes.