Conditional Authentication using .htaccess

Working on sites very close to live is always tricky. Clients want to use the site unhindered, you want to check it through before it goes live. The one thing you don’t want happen is for the public to discover and access the site before it goes live.
The code below allows only grant access without [...]