Welcome Guest, Not a member yet? Register   Sign In
.htaccess password protect for a specific domain
#1

[eluser]CroNiX[/eluser]
For a project, I have
www.mydomain.com
and
dev.mydomain.com

and I want to use a single htaccess file that will work for both of them, but I want password protection for the dev site. This is so we can use a single .htaccess file in git.


if(site_url === 'dev.mydomain.com')
{
AuthType basic
AuthName "Development"
AuthUserFile /home/path/.htpasswd
Require valid-user
}

how would you write that in .htaccess?

Thanks


Messages In This Thread
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 06:10 PM
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 07:03 PM
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 07:15 PM
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 10:08 PM
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 10:09 PM
.htaccess password protect for a specific domain - by El Forum - 03-17-2010, 11:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB