Here is the code to allow one URL and block all others on an Apache server.
SetEnvIf REQUEST_URI "/url_autorisee$" noauth=1
AuthType Basic
AuthName "Authorization Required"
AuthUserFile /xxx/xxx/xxxx/xxxxxx/xxxx/.htpasswd
Order deny,allow
Satisfy any
Deny from all
Allow from env=noauth
Allow from env=REDIRECT_noauth
Require valid-user