테스트 사이트 - 개발 중인 베타 버전입니다

구글 웹마스터에서 홈페이지 검색 반영하는 법 채택완료

동키동키 9년 전 조회 3,464

안녕하세요.

 

구글 웹마스터에서 검색 반영하는 법 중 다음과 같은 방법이 있는데 정확히 어디에 추가를 해야하는지요?

 

 

 

어떤 파일을 수정해야 하는지 답변 부탁드립니다.

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트

head.sub.php 페이지에 보시면

 

if (G5_IS_MOBILE) {

    echo ''.PHP_EOL;

    echo ''.PHP_EOL;

    echo ''.PHP_EOL;

} else {

    echo ''.PHP_EOL;

    echo ''.PHP_EOL;

}

이부분 있습니다.

이 위에나 밑에 다가 추가하시면 됩니다.

 

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

동키동키
9년 전
덕분에 적용하였습니다^^

고맙습니다!!!

댓글을 작성하려면 로그인이 필요합니다.

답변 고맙습니다.

 

head.sub.php 내용 어느 부분인가요?

 

내용 첨부합니다.

 

-------------------------------------------------------------------------------------

$begin_time = get_microtime();

if (!$g4['title'])     $g4['title'] = $config['cf_title'];

// 쪽지를 받았나? if ($member['mb_memo_call']) {     $mb = get_member($member[mb_memo_call], "mb_nick");     sql_query(" update {$g4[member_table]} set mb_memo_call = '' where mb_id = '$member[mb_id]' ");

    alert($mb[mb_nick]."님으로부터 쪽지가 전달되었습니다.", $_SERVER[REQUEST_URI]); }

// 현재 접속자 //$lo_location = get_text($g4[title]); //$lo_location = $g4[title]; // 게시판 제목에 ' 포함되면 오류 발생 $lo_location = addslashes($g4['title']); if (!$lo_location)     $lo_location = addslashes($_SERVER['REQUEST_URI']); //$lo_url = $g4[url] . $_SERVER['REQUEST_URI']; $lo_url = addslashes($_SERVER['REQUEST_URI']); if (strstr($lo_url, "/$g4[admin]/") || $is_admin == "super") $lo_url = "";

// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면 // 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음 header("Content-Type: text/html; charset=$g4[charset]"); $gmnow = gmdate("D, d M Y H:i:s") . " GMT"; header("Expires: 0"); // rfc2616 - Section 14.21 header("Last-Modified: " . $gmnow); header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 /* // 만료된 페이지로 사용하시는 경우 header("Cache-Control: no-cache"); // HTTP/1.1 header("Expires: 0"); // rfc2616 - Section 14.21 header("Pragma: no-cache"); // HTTP/1.0 */ ?> 0                            order by bf_no                            limit 1");

    if ($fb_file) {         $ogp_thumb = $g4['url']."/data/file/".$bo_table."/".$fb_file['bf_file'];     }     else {         preg_match_all("/

        $mat = '';         for ($i=0, $m=count($matchs[1]); $i<$m; ++$i)         {             $mat = $matchs[1][$i];

            // 이모티콘 제외             if (strstr($mat, "mw.basic.comment.image")) $mat = '';             if (strstr($mat, "mw.emoticon")) $mat = '';             if (preg_match("/cheditor[0-9]\/icon/i", $mat)) $mat = '';

            if ($mat) {                 $ogp_thumb = $mat;                 break;             }         }

        if (!$mat) {             $ogp_thumb = $g4['path']."/data/file/".$bo_table."/thumbnail/".$wr_id.".jpg";

            if (!@is_file($ogp_thumb))                 $ogp_thumb = $g4['path']."/data/file/".$bo_table."/thumbnail/".$wr_id;

            if (!@is_file($ogp_thumb))                 $ogp_thumb = $g4['path']."/data/file/".$bo_table."/thumb/".$wr_id;

            if (!@is_file($ogp_thumb))                 $ogp_thumb = '';             else                 $ogp_thumb = str_replace($g4['path'], $g4['url'], $ogp_thumb);         }     }

    $ogp_title = trim(cut_str(strip_tags($write['wr_subject']), 255));     $ogp_site_name = trim(cut_str(strip_tags($config['cf_title']), 255));

    $ogp_url = $g4['url']."/".$g4['bbs']."/board.php?bo_table=".$bo_table."&wr_id=".$wr_id;     if (function_exists("mw_seo_url"))         $ogp_url = mw_seo_url($bo_table, $wr_id);

    $ogp_description = $write['wr_content'];     $ogp_description = trim(preg_replace("/{이미지:[0-9]+}/iUs", "", $ogp_description));     $ogp_description = strip_tags($ogp_description);     $ogp_description = explode("\n", $ogp_description);     for ($i=0, $m=count($ogp_description); $i<$m; $i++) {         $ogp_description[$i] = trim($ogp_description[$i]);     }     $ogp_description = implode(" ", $ogp_description);     $ogp_description = preg_replace("/\n/", " ", $ogp_description);     $ogp_description = preg_replace("/\"/", "", $ogp_description);     $ogp_description = preg_replace("/'/", "", $ogp_description);     $ogp_description = preg_replace("/,/", "", $ogp_description);     $ogp_description = preg_replace("/http:\/\/[^\s]+/", "", $ogp_description);     $ogp_description = cut_str($ogp_description, 150);     $ogp_description = trim($ogp_description);

    $ogp = "\n";     $ogp.= "\n";     $ogp.= "\n";     $ogp.= "\n";     $ogp.= "\n";     echo $ogp; } ?> <?=$g4['title']?> >

-------------------------------------------------------------------------------------

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

쌔깜디블랙죠
9년 전
<meta charset="<?=$g4['charset']?>">
이 아래에다 추가하시면 되겠네요.
딱 여기에 써야한다고 정해진건 아닙니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인