사이트 내 전체검색

그누보드 주소/게시판코드/글번호 형식으로 읽기,목록 처리하는 방법

페이지 정보

로빈 조회 31회 2019-01-29 15:00

본문

예)
http://www.10min.co.kr/free/861
->
http://www.10min.co.kr/board.php?bo_table=free&wr_id=861


1. /.htaccess

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off


<IfModule mod_rewrite.c>
RewriteEngine On

## www 없는것을 www 있는것으로 변환
# RewriteCond %{HTTP_HOST} !^www\.
# RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#RewriteRule ^([a-zA-Z0-9_]+)/s$ /bbs/board.php?bo_table=$1&sca=$2 [L,QSA]

RewriteBase /
RewriteRule ^index.php$ - [L]

RewriteRule ^(adm|phpmyadmin|plugin|system|_sys)($|/) - [L]
RewriteRule ^/data/file($|/.*) - [L]
RewriteRule ^(qurl)/(.+)$ /bbs/index.php [L,QSA]


RewriteRule ^z([a-zA-Z0-9_]{5,10}+)$ /theme/ar.basic/coupon_view.php?cd=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9_]{2,20})/([0-9]+)$ /bbs/board.php?bo_table=$1&wr_id=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9_]{2,20})/p([0-9]+)/([0-9]+)$ /bbs/index.php [L,QSA]
#RewriteRule ^([a-zA-Z0-9_]+)/p([0-9]+)/([0-9]+)$ /bbs/board.php?bo_table=$1&page=$2&wr_id=$3 [L,QSA]
#RewriteRule ^([a-zA-Z0-9_]+)/p([0-9]+)$ /bbs/board.php?bo_table=$1&page=$2 [L,QSA]
#RewriteRule ^([a-zA-Z0-9_]+)/g$ /plugin/ar.util/group.php?gr_id=$1 [L,QSA]
#RewriteRule ^(ar.build/group.php?gr_id=)$ /plugin/ar.util/group.php?gr_id=$1 [L,QSA]

RewriteBase /
RewriteRule ^(adm|phpmyadmin|plugin|system)($|/) - [L]
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


<files wp-config.php>
order allow,deny
deny from all
</files>

<files data/dbconfig.php>
order allow,deny
deny from all
</files>


</IfModule>

<IfModule mod_url.c>
CheckURL On
ServerEncoding UTF-8
</IfModule>



스킨의 /list.skin.php  /view.skin.php 등의 파일 상단에 ./board*** 를 /bbs/board 로 수정


$arr=explode(' ','reply_href scrap_href search_href update_href write_href admin_href copy_href delete_href good_href list_href move_href next_href nogood_href prev_href');
foreach($arr as $buff) {
if (isset($$buff)) {
if ($$buff && substr($$buff,0,2)=='./')
$$buff=G5_BBS_URL.substr($$buff,1);
}
}
if (isset($write_pages)) $write_pages=str_replace('./board.php',G5_BBS_URL.'/board.php',$write_pages);



실행결과
http://www.10min.co.kr/free/861


자유게시판
./write.php?w=r&bo_table=free&wr_id=861
-> http://www.10min.co.kr/bbs/write.php?w=r&bo_table=free&wr_id=861
./scrap_popin.php?bo_table=free&wr_id=861
-> http://www.10min.co.kr/bbs/scrap_popin.php?bo_table=free&wr_id=861

->
./write.php?w=u&bo_table=free&wr_id=861&page=
-> http://www.10min.co.kr/bbs/write.php?w=u&bo_table=free&wr_id=861&page=
./write.php?bo_table=free
-> http://www.10min.co.kr/bbs/write.php?bo_table=free
http://www.10min.co.kr/adm/board_form.php?w=u&bo_table=free
-> http://www.10min.co.kr/adm/board_form.php?w=u&bo_table=free
./move.php?sw=copy&bo_table=free&wr_id=861&page=
-> http://www.10min.co.kr/bbs/move.php?sw=copy&bo_table=free&wr_id=861&page=
./delete.php?bo_table=free&wr_id=861&token=15487412735c4fea998db6e&page=
-> http://www.10min.co.kr/bbs/delete.php?bo_table=free&wr_id=861&token=15487412735c4fea998db6e&page=
./good.php?bo_table=free&wr_id=861&good=good
-> http://www.10min.co.kr/bbs/good.php?bo_table=free&wr_id=861&good=good
./board.php?bo_table=free&page=
-> http://www.10min.co.kr/bbs/board.php?bo_table=free&page=
./move.php?sw=move&bo_table=free&wr_id=861&page=
-> http://www.10min.co.kr/bbs/move.php?sw=move&bo_table=free&wr_id=861&page=
./board.php?bo_table=free&wr_id=784
-> http://www.10min.co.kr/bbs/board.php?bo_table=free&wr_id=784
./good.php?bo_table=free&wr_id=861&good=nogood
-> http://www.10min.co.kr/bbs/good.php?bo_table=free&wr_id=861&good=nogood
./board.php?bo_table=free&wr_id=849
-> http://www.10min.co.kr/bbs/board.php?bo_table=free&wr_id=849

댓글목록

등록된 댓글이 없습니다.

게시물 검색
목록중에서 로고가 붙은것은 활동이 많은 멤버쉽 회원만 다운받을수 있는 자료입니다.
멤버쉽 회원이 되는 방법은 공지사항을 참고하세요.

회원로그인

접속자집계

오늘
648
어제
743
최대
3,566
전체
2,335,094