rAthus icon

.htaccess password protection for a specific domain

rAthus | PRO | 12/13/23 08:28:33 AM UTC (Edited) | 0 ⭐ | 461 👁️ | Never ⏰ | []
text |

360 B

|

None

|

0 👍

/

0 👎

### password protection for a specific domain name:
<If "req('Host') == 'dev.example.com'">
	AuthName "Staff Only"
	AuthType Basic
	AuthUserFile /home/example/www/.htpasswd
	Require valid-user
</If>
 ### if you want to allow a specific folder to be public, put these two lines (uncommented) in a .htaccess file at folder's root:
#Allow from all
#Satisfy any

Comments