WordPress のディレクトリに専用のフォルダーを置き
いろいろ調べてみたところ、現在重宝しているプラグインの幾つかのコードが影響?、なので、新たに Basic 認証を作成して、そのフォルダー内に

① 以前と同様に「ApacheのopenSSLでBasic認証を作成して秘密のフォルダーを作る。」で htaccess、htpassword を作成して認証用のフォルダーに置き換えた。
② index.php の設置(簡単な header & body、footer の作成)
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Hello PHP</title>
</head>
<body>
<p> <?php echo "The List of Secret Files"; ?> </p>
<?PHP
$dirpath = "secretR/"; //ディレクトリパス
$dirlist = dir($dirpath);
while( $filename = $dirlist->read() ){
//ファイルのみ表示
if( (is_dir($filename) == false) && ($filename!=".." || $filename!= "." ) ){
print("<a href=\"" . $dirpath . $filename . "\">".$filename."</a><br />\n" );
}
}
$dirlist->close();
?>
<p> <?php echo "The End of Secret Files"; ?> </p>
<p> <?php include './footer.php';?> </p>
</body>
</html>
[footer.php]
<footer>
© 2026 <a href="https://www. ~ "> ~ </a> へ
</footer>
③
※ 次のステップは、












