Using Apache/2.4.41. Trying to exclude 1 URL from Basic Auth. The URL I want to exclude is /index.php?r=admin/remotecontrol I've tried many different ways to specify this, but none have worked for me. This is my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require expr %{REQUEST_URI} =~ m#.*/remotecontrol#
Require valid-user
What am I missing or doing wrong?