답변 3개
채택된 답변
+20 포인트
12개월 전
extend/user.config.php
</p>
<p>if ($is_member == false) {
//$subroot = '/subdir';
$subroot = '';
$allowed_urls = [ </p>
<p> $subroot . '/main.php',
$subroot . '/bbs/login.php',
$subroot . '/bbs/login_check.php',
$subroot . '/bbs/register.php',
$subroot . '/bbs/register_form.php',
$subroot . '/bbs/register_form_update.php',
$subroot . '/plugin/kcaptcha/kcaptcha_image.php',
$subroot . '/plugin/kcaptcha/kcaptcha_session.php',
$subroot . '/plugin/kcaptcha/kcaptcha_mp3.php',
$subroot . '/bbs/ajax.mb_id.php',
$subroot . '/bbs/ajax.mb_nick.php',
$subroot . '/bbs/ajax.mb_email.php',
];
if (in_array($_SERVER['PHP_SELF'], $allowed_urls) == false) {
header('Location: ' . current($allowed_urls));
exit();
}
}</p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
12개월 전
main.php
</p>
<p><?php
include_once('./_common.php');</p>
<p>if ($is_member) {
header('Location: index.php');
exit;
}</p>
<p>include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_BBS_PATH.'/login.php');
?></p>
<p><?php
include_once(G5_PATH.'/tail.sub.php');</p>
<p>
index.php의 if (!defined('_GNUBOARD_')) exit; 아래에 다음코드 추가
</p>
<p>if(!$is_member)goto_url(G5_URL.'/main.php');</p>
<p>
더욱 간단한 방법은 .htaccess가 되는 환경에서
</p>
<p>RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ main.php [L]</p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인