Password protect a non-physical directory

I’m trying to password protect a directory on a website with mod_auth_digest mod_auth_digest - Apache HTTP Server

I have a content management system (Drupal), which has .htaccess file in its root directory.

I added the following lines in .htaccess:

AuthType Digest
AuthName “Member”
AuthDigestDomain /Member/ http://mysite.local/myfolder/
AuthDigestProvider file
AuthUserFile /home/user1/.htpasswd
require valid-user

There is no physical directory named myfolder. But it’s done with apache rewrites that typing http://mysite.local/myfolder/ in the browser activates certain functionality.

The problem is that even though I specify in AuthDigestDomain this specific directory, the password is asked also in http://mysite.local

How can I make the path http://mysite.local/myfolder/ password protected but allow users to go http://mysite.local without a password?

Thanks in advance!!

AuthName “Member”
AuthType Basic
AuthUserFile /www/mysite.local/myfolder/.htpasswd
require valid-user

/www/mysite.local/myfolder/ - physical directory named to myfolder.

I need to use auth digest, I can’t use basic authentication.

Also, if I create a physical directory then the password protection works but after providing correct password apache tries to serve the content from the directory (which is empty except the .htpasswd file). This is the main problem, auth digest is working in other aspects.