.htaccess PHP - Hobe it make sence.
Hey All
i would like to use .htaccess to protect a folder, i know how to do it with the, "htpasspwd" and put the .htaccess in the folder.
Is there any way that i can get htaccess to include a php file to check user and password. instead of using the htpasspwd file
##### if u know what i mean ################
AuthName "restricted stuff"
AuthType Basic
AuthUserFile userfile.php
require valid-user
####################
########## userfile.php #######
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
require('../../siteuser/config.php');
require('../../siteuser/functions.php');
if (allow_access(user) != "yes") {
{
include ('../../siteuser/no_access.html');
exit;
}
?>
Hobe it make sence.
Best Regard
Joe Montana
|
Recent comments
5 hours 4 min ago
11 hours 46 min ago
15 hours 36 min ago
17 hours 15 min ago
1 day 1 hour ago
1 day 11 hours ago
1 day 11 hours ago
1 day 15 hours ago
1 day 19 hours ago
1 day 20 hours ago