Excellent Apache mod_rewrite Cheat Sheet
REQUEST_URI
Excellent Apache mod_rewrite Cheat Sheet
REQUEST_URI
Simple Password Protection for a Directory Using .htaccess
The basic snippets are:
The basic .htaccess configuration tells this directory to use basic authentication, what to title the login dialog and where to find the .htpasswd file.
AuthType Basic AuthName "restricted area" AuthUserFile /home/user_name/public_html/protected-dir/.htpasswd require valid-user
.htpasswd is simple a list of usernames and passwords in the format of: user_name:password. One entry per line.
your_user_name:secret_password another_user:another_password someone_else:I*3joidsl__2
Resource: David Wals Blog
1) Put your .htpasswd above your root so visitors can’t access it #/html/username/.htpasswd put username and encryped password of your members 2) It doesn’t matter how many files under how many directories you wanted to protect as they can share … Continue reading
| No entries found. |
| No entries found. |
| 0.0288 | |
| 0.0331 | |
| 0.1240 | |
| 0.0260 | |
| 0.0300 | |
| 0.0250 | |
| 0.0219 | |
| 0.0579 | |
| 0.0260 | |
| 0.1209 | |
| 0.0520 | |
| 0.2441 | |
| 0.0250 | |
| 0.0660 | |
| 0.1180 | |
| 0.3071 | |
| 0.1230 | |
| 0.0341 | |
| 0.0210 | |
| 0.0331 | |
| 0.0539 | |
| 0.0219 | |
| 0.0210 | |
| 0.0510 | |
| 0.3290 | |
| 0.1740 | |
| 0.0491 | |
| 0.0720 | |
| 0.1950 | |
| 0.0391 | |
| 0.1290 | |
| 0.9050 | |
| 0.0741 | |
| 0.3040 | |
| 0.1702 | |
| 0.0691 | |
| 2.4509 | |
| 0.1159 | |
| 0.0579 | |
[0] => themes/twentyeleven/inc/theme-options.php [1] => themes/twentyeleven/inc/widgets.php [2] => themes/twentyeleven/tag.php [3] => themes/twentyeleven/header.php [4] => themes/twentyeleven/searchform.php [5] => themes/twentyeleven/content-link.php [6] => themes/twentyeleven/content.php [7] => themes/twentyeleven/sidebar.php [8] => themes/twentyeleven/footer.php [9] => themes/twentyeleven/sidebar-footer.php
$_GET = array (
);$_POST = array (
);$_COOKIE = array (
);$_SESSION = array (
);$_SERVER = array (
'SERVER_SOFTWARE' => 'Apache',
'REQUEST_URI' => '/tag/htaccess/',
'LSPHP_ENABLE_USER_INI' => 'on',
'PATH' => '/usr/local/bin:/usr/bin:/bin',
'TEMP' => '/tmp',
'TMP' => '/tmp',
'TMPDIR' => '/tmp',
'PWD' => '/',
'HTTP_ACCEPT' => '*/*',
'HTTP_ACCEPT_ENCODING' => 'gzip, br, zstd, deflate',
'CONTENT_LENGTH' => '0',
'HTTP_HOST' => 'www.zzzzzzzzz.net',
'HTTP_USER_AGENT' => 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)',
'HTTP_X_HTTPS' => '1',
'REDIRECT_UNIQUE_ID' => 'aiIKsPfXebGq05S5ErDChQAAfk0',
'REDIRECT_QS_ConnectionId' => '1780615856748554331016016',
'REDIRECT_SCRIPT_URL' => '/tag/htaccess/',
'REDIRECT_SCRIPT_URI' => 'https://www.zzzzzzzzz.net/tag/htaccess/',
'REDIRECT_HTTPS' => 'on',
'REDIRECT_SSL_TLS_SNI' => 'www.zzzzzzzzz.net',
'REDIRECT_HTTP2' => 'on',
'REDIRECT_H2PUSH' => 'off',
'REDIRECT_H2_PUSH' => 'off',
'REDIRECT_H2_PUSHED' => '',
'REDIRECT_H2_PUSHED_ON' => '',
'REDIRECT_H2_STREAM_ID' => '193',
'REDIRECT_H2_STREAM_TAG' => '1016016-1837-193',
'REDIRECT_STATUS' => '200',
'UNIQUE_ID' => 'aiIKsPfXebGq05S5ErDChQAAfk0',
'QS_ConnectionId' => '1780615856748554331016016',
'SCRIPT_URL' => '/tag/htaccess/',
'SCRIPT_URI' => 'https://www.zzzzzzzzz.net/tag/htaccess/',
'HTTPS' => 'on',
'SSL_TLS_SNI' => 'www.zzzzzzzzz.net',
'HTTP2' => 'on',
'H2PUSH' => 'off',
'H2_PUSH' => 'off',
'H2_PUSHED' => '',
'H2_PUSHED_ON' => '',
'H2_STREAM_ID' => '193',
'H2_STREAM_TAG' => '1016016-1837-193',
'SERVER_SIGNATURE' => '',
'SERVER_NAME' => 'www.zzzzzzzzz.net',
'SERVER_ADDR' => '10.37.77.36',
'SERVER_PORT' => '443',
'REMOTE_ADDR' => '216.73.216.75',
'DOCUMENT_ROOT' => '/home1/zzz/public_html',
'REQUEST_SCHEME' => 'https',
'CONTEXT_PREFIX' => '',
'CONTEXT_DOCUMENT_ROOT' => '/home1/zzz/public_html',
'SERVER_ADMIN' => 'webmaster@zzzzzzzzz.net',
'SCRIPT_FILENAME' => '/home1/zzz/public_html/index.php',
'REMOTE_PORT' => '43420',
'REDIRECT_URL' => '/tag/htaccess/',
'SERVER_PROTOCOL' => 'HTTP/2.0',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '',
'SCRIPT_NAME' => '/index.php',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => 1780615856.7513630390167236328125,
'REQUEST_TIME' => 1780615856,
'argv' =>
array (
),
'argc' => 0,
);