openlitespeed icon indicating copy to clipboard operation
openlitespeed copied to clipboard

Combination of Password Protection and Rewriting Rules not possible

Open egloffmark opened this issue 3 years ago • 0 comments

Dear all I recognized an issue with v1.7.1.6 that the password protection is not working in case I have context specified for a virtual location (when it does not exist on the filesystem) and rewriting rules have been applied.

Example

  1. specif a static context with a virtual URI e.g. "/backend/"
  2. specify rewriting rule to map any request to "index.php" in this context
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
  1. specify for this context a password protection through realm

result: No password protection will appear but the rewriting get applied

I also tried to make use of other contexts like "Litespeed SAPI" with "/backend/" but this is not usable because I can not specify any rewriting rules at this context.

So how can I achieve to have for a virtual location a password protection enabled for which then later the rewriting rules can be applied / used?

According to my understanding and comparison to Apache, I think the password protection has first to be evaluated and then afterwards the rewriting rules.

egloffmark avatar Nov 28 '22 14:11 egloffmark