PEAKのGIJOEさんのコメントを見るに、myalbumの画像をゲストに見せないのは一筋縄に行かないようですね。
僕も以前から興味があったのでちょっと挑戦してみました。
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} !.*\.php$
RewriteRule ^(.*)$ image.php?path=$1 [L]
<?php
include '../../mainfile.php';
if( !is_object($xoopsUser) ) {
header('Content-type: image/gif');
readfile('../../images/blank.gif');
exit();
}
$file = @trim($_GET['path']);
if(file_exists($file)){
$image_info = (getimagesize($file));
header('Content-type: '.$image_info['mime']);
readfile($file);
}
?>
rewrite_modをしこんだ.htaccessとimages.phpを /uploads/photosに置くだけという単純なやり方です。
こんな適当なつくりなら誰でも思いつきますか...^^;;
セキュリティもなんだか自信がありませんし。
[追記]軽く脆弱がありますね( ̄ー ̄; ヒヤリ
トラバURL : http://suin.asia/trackback/253
氷川 XOOPS Module 開発室