Skip to content

Instantly share code, notes, and snippets.

@jcamp
Forked from barbwiredmedia/.htaccess
Created July 6, 2018 17:50
Show Gist options
  • Save jcamp/7db82936e0f215795f5815c67021cff8 to your computer and use it in GitHub Desktop.
Save jcamp/7db82936e0f215795f5815c67021cff8 to your computer and use it in GitHub Desktop.
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /your/server/path/.htpasswd
Require valid-user
someaccess:coolpassphrase
<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment