I 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. means no password dialog is poping up.
Example
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
- I also tried to have only one static context for "/backend/" but when I tried to activate "Rewriting Rules" then the password protection is not working, means no password dialog is poping up.
- I also tried with a "Litespeed SAPI" context with "/backend/" but here I am not able to apply any rewriting rules
Example
- context "Static" with URI "/" and rewriting rules
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 because it finds the directory
- context "LiteSpeed SAPI" with "/backend/" and "realm" but is not asking for the password.