を持っています
http://example.com/DL/
誰でも無料でアクセスできるディレクトリ、許可されていないユーザーのアクセスを拒否したいので、コードを使用して非常に単純なindex.phpを作成します
<?php
include('config.php');
session_start();
$result = (mysql_query("SELECT * FROM accounts WHERE hash='".$_SESSION['hash']."' ");
$row = mysql_fetch_array(result);
if($row['access']) {
return true;
} else {
header("location: /login.php");
}
?>
質問:ユーザーがリクエストするたびにindex.phpがtrueを返すかどうかを確認するために.htaccessを設定する方法はありますか
http://example.com/DL/*
?