Skip to content

Instantly share code, notes, and snippets.

@smohadjer

smohadjer/.htaccess

Forked from man-oi/.htaccess
Last active May 3, 2020
Embed
What would you like to do?
htpasswd
AuthType Basic
AuthName "only for valid users"
AuthUserFile /full/path/.htpasswd
Require valid-user
// If you don't have ssh access to your site, put the following command in a php file and upload it to your server to find out the full path to .htpasswd:
<?php echo realpath('./') . PHP_EOL; ?>
// You can create a .htpasswd using terminal:
htpasswd -c .htpasswd username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.