1원 팁 긴주소 줄이기 (Rewrite 방식아님) 정보
1원 팁 긴주소 줄이기 (Rewrite 방식아님)관련링크
첨부파일
본문
1원 팁 긴주소 줄이기 (Rewrite 방식아님)
http://freeimage.kr/bbs/board.php?bo_table=tip_gnu&wr_id=453 를
http://freeimage.kr/bbs/?tip_gnu=453 로 줄임.
http://freeimage.kr/bbs/board.php?bo_table=tip_gnu 는
http://freeimage.kr/bbs/?tip_gnu 로 됨..
/bbs/index.php 에 다음 문장을 넣으면됩니다.
<?
if (!$bo_table && preg_match("/(.[a-zA-Z0-9_]+)=([0-9]+)/", urldecode($_SERVER[QUERY_STRING]), $arr)) {
$_GET[bo_table]=$arr[1];
$_GET[wr_id]=$arr[2];
}
else if (!$bo_table && preg_match("/^[a-zA-Z0-9_]+\$/", urldecode($_SERVER[QUERY_STRING]), $arr)) {
$_GET[bo_table]=$arr[0];
}
include "board.php";
?>
http://freeimage.kr/bbs/board.php?bo_table=tip_gnu&wr_id=453 를
http://freeimage.kr/bbs/?tip_gnu=453 로 줄임.
http://freeimage.kr/bbs/board.php?bo_table=tip_gnu 는
http://freeimage.kr/bbs/?tip_gnu 로 됨..
/bbs/index.php 에 다음 문장을 넣으면됩니다.
<?
if (!$bo_table && preg_match("/(.[a-zA-Z0-9_]+)=([0-9]+)/", urldecode($_SERVER[QUERY_STRING]), $arr)) {
$_GET[bo_table]=$arr[1];
$_GET[wr_id]=$arr[2];
}
else if (!$bo_table && preg_match("/^[a-zA-Z0-9_]+\$/", urldecode($_SERVER[QUERY_STRING]), $arr)) {
$_GET[bo_table]=$arr[0];
}
include "board.php";
?>
추천
6
6
댓글 10개
좋은 팁이네요 ~ 주소가 이렇게 자동으로 다 바뀌면 좋을텐데요 ㅠ
좋은팁 감사드립니다!..
좋은팁이네용 추천!
아무 변화 없네요
로빈아빠님 오랜만에 오셨네요. 건강하시죠....^^
좋은정보 감사합니다~~~~
좋은정보 감사합니다~~~~
좋은 정보네요^^
아무런 변화가 없네요???
ㅎㅎ
아주 잘 되네요...
index.php만 만들어 넣었다고 그냥 되는게 아니라,
해당 게시물의 링크를 짧은 주소로 걸어서 사용해야 합니다.
아주 잘 되네요...
index.php만 만들어 넣었다고 그냥 되는게 아니라,
해당 게시물의 링크를 짧은 주소로 걸어서 사용해야 합니다.
힌트주셔서 정말 감사합니다. 근데 제가 초보라서 아직도 이해가 안갑니다. 해당 게시물의 링크를 짧은 주소로 어떻게 거나요 ㅠㅠ?
좋은 팁 감사합니다.