1

I want to password protect for URL /user/login and /user/login/.

I added below code at my .htaccess file. But it prompted on all pages including home page.

AuthUserFile /var/www/project/.htpasswd
AuthName "Private access"
AuthType Basic
Require expr %{REQUEST_URI} =~ m#^.*/user/login/$#
require user dummyuser

I know problem lies within Require expr %{REQUEST_URI} =~ m#^.*/user/login/$#.How can I correct this?

Hiranya Sarma
  • 1,454
  • 4
  • 15
  • 25

0 Answers0